David Arnold wrote: [...]
I place the following script in /var/www/cgi-perl and when I request it from a browser I get a popup asking if I want to save the file to disk or open it. Not the behavior I expect.
#! /usr/bin/perl print "Content-type: text/plain\n\n"; print "Mod_perl 2.0 rocks!\n";
When you request it, what's the URI that you use to access it?
scinux.redwoods.edu/cgi-perl/rocks.pl
Another simple file I have in /var/www/cgi-perl is:
#! /usr/bin/perl # perltest.pl print "Content-Type: text/html\n\n"; print "<html><head><title>Script Environment</title></head><body>\n"; print map{ "$_=$ENV{$_}<br>\n"} sort (keys (%ENV)); print "</body></html>\n";
And curiously enough, this works when accessed by my browser, and one of the environment variables it prints to the screen is:
And what's the URI this time?
http://scinux.redwoods.edu/cgi-perl/perltest.pl
OK, so try this: do
cp perltest.pl rocks.pl
and rocks.pl should certainly work just like perltest.pl. Now try to slowly morph it into your original rocks.pl and see where the thing goes wrong. That's the usuall good-machine/bad-machine testing technique.
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html