LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Perl scripts won't run on Apache -- they did before (http://www.linuxquestions.org/questions/linux-server-73/perl-scripts-wont-run-on-apache-they-did-before-621636/)

Tom Douglas 02-16-2008 12:33 PM

Perl scripts won't run on Apache -- they did before
 
I have a set of Perl scripts that are not working right on my Fedora 6 notebook. They have been untouched for the last several months. They were working months ago. The same copy of the Perl scripts continue to work well on a separate web server, live on the Internet.

The live website Perl scripts were downloaded and placed in the cgi-bin directory of my local F6 box, generating the same errors in /var/log/httpd/error_log, shown....

Quote:

Premature end of script headers: signup
(2)No such file or directory: exec of '/home/portal/col/cgi-bin/signup' failed,

referer: http://col.net
A simple "Hello World" script also in the same /home/portal/col/cgi-bin directory which is successfully executed; no errors. Permissions on all script files are identical, so I can be fairly certain that permissions are not the issue. Here's the directory....

Quote:

-rwxrwxr-x 1 toms toms 233 Jul 7 2007 hello.pm
-rwxr-xr-x 1 toms toms 23064 Mar 5 2007 part1.pm
-rwxr-xr-x 1 toms toms 2860 Jan 13 2007 part2.pm
-rwxr-xr-x 1 toms toms 2518 Apr 23 2005 part3.pm
-rwxr-xr-x 1 toms toms 609 May 7 2005 signup
A piece of /etc/httpd/conf/httpd.conf is shown below....

Quote:

<VirtualHost 192.168.1.7>
ServerName col.net
ServerAlias col.toms.net
DocumentRoot /home/portal/col/www
DirectoryIndex index.htm
ScriptAlias /cgi-bin/ /home/portal/col/cgi-bin/
SetEnv HOMEDIR /home/portal/col # HOMEDIR is used in the script set
</VirtualHost>
The Perl scripts work well on a separate live website. Those same scripts fail on my local F6 box. I have a feeling that I tweaked something in Apache that shouldn't have been tweaked.

Any clues on what the deal is here? Thank you!

Tom D.
Denver, Colorado

carltm 02-17-2008 06:26 AM

First, a suggestion. Whenever you change something in
a config file, put in a comment with you initials, the
date, and the reason for the change. Then three months
later you can simply search for your initials in the file
and see what you had changed.

Check your error log in /var/log or /var/log/apache.
Odds are good that it will have a clue.


All times are GMT -5. The time now is 05:25 AM.