I have recently changed over to a new server with 2.0.54. It seems to be the default behaviour of Apache on the new server to try to excecute all files in a cgi-bin directory. In other words, Apache attempts to excecute all files, not just scripts.
My old server has 2.0.43 and didn't have this behaviour.
What makes it more confusing is that the config files are practically identical.
The problem started when I moved a perl script to the new server and started to get this:
I tracked it down to this line in my script:
The script itself ran fine and spat out the HTML. The client browser hit 'service.gif' and Apache attempted to excecute it as a script.
I have moved the image out of the cgi-bin directory so it works now. However, I would like to get it to work in cgi-bin so it can go in its proper location.
I have been experimenting with <Directory> and <Files> to over-ride the ScriptAlias for .jpg's and .gif's, but alas no luck.
Alchemy is easy with Perl!
s/lead/gold/g;
My old server has 2.0.43 and didn't have this behaviour.
What makes it more confusing is that the config files are practically identical.
The problem started when I moved a perl script to the new server and started to get this:
Code:
[Mon Aug 01 14:04:58 2005] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: service.gif, referer: ...xxx.../cgi-bin/webform/PsychTracRequest.pl
I tracked it down to this line in my script:
Code:
print '</FONT><p><br></TD></TR><TR><TD bgcolor="#cFFFFF"><center><img src="../images/service.gif" width=130 height=100></center></TD></TR></TABLE>';
The script itself ran fine and spat out the HTML. The client browser hit 'service.gif' and Apache attempted to excecute it as a script.
I have moved the image out of the cgi-bin directory so it works now. However, I would like to get it to work in cgi-bin so it can go in its proper location.
I have been experimenting with <Directory> and <Files> to over-ride the ScriptAlias for .jpg's and .gif's, but alas no luck.
Alchemy is easy with Perl!
s/lead/gold/g;