> -----Original Message----- > From: Matt Wetherill [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 19, 2002 11:11 AM > To: Perl beginners > Subject: CGI script problem > > > Hi list, > > I'm just trying to get started with cgi (w2k, Apache 2.0.40), > and have been > using the sample script "printenv.pl" which is included with Apache: > > #!c:/Perl/bin/Perl.exe > ## > ## printenv -- demo CGI program which just prints its environment > ## > > print "Content-type: text/plain\n\n"; > foreach $var (sort(keys(%ENV))) { > $val = $ENV{$var}; > $val =~ s|\n|\\n|g; > $val =~ s|"|\\"|g; > print "${var}=\"${val}\"\n"; > } > > However, if I try to run this script from a browser using the url: > > http://localhost/cgi-bin/printenv.pl > > Netscape6 works fine and displays the environment in the > browser window, but > IE 6 tries to download the script and it looks like the > server isn't being > allowed to run it.
No, I think the server is running it. > > I appreciate that this is probably a bit off-topic, but any advice or > pointers to other resources would be greatly appreciated. Try renaming the script to "printenv.cgi" or just "printenv" and see if that fixes it. IE is bad about not following standards, and in this case I think the .pl extension is causing IE to treat the file as something that needs to be downloaded or run. (This question should have been posted to the CGI list: [EMAIL PROTECTED]) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]