[CentOS] OT: Apache Script Problem

Mike Kercher mike at CamaroSS.net
Thu Oct 20 21:52:06 UTC 2005

centos-bounces at centos.org <> scribbled on Thursday, October 20, 2005 4:44

> I recently moved a web site from an old Windows NT machine
> running Apache to a server running CentOS 4.1. Everything is
> working fine on the site except for one perl script. I have
> the standard directory setup:
> /var/www/html
> /var/www/cgi-bin
> etc
> We had to change our scripts when we moved them because they
> had windows paths. We have a problem with one script called:
> contactp.pl
> It's located at: /var/www/cgi-bin
> [root at server cgi-bin]# pwd
> /var/www/cgi-bin
> [root at server cgi-bin]# ls -l:
> -rwxrwxrwx  1 apache root 1047 Oct 20 15:32 contactp.pl
> When the script is called I get a 500 Internal Server Error.
> The error log gives me the following two errors:
> [Thu Oct 20 15:43:35 2005] [error] (2)No such file or
> directory: exec of '/var/www/cgi-bin/contactp.pl' failed, referer:
> http://www.mysite.com/contactus.html
> [Thu Oct 20 15:43:35 2005] [error] Premature end of script headers:
> contactp.pl, referer: http://www.mysite.com/contactus.html
> The file is definitely there and apache owns it. I'm not sure
> what else to look for now. Anyone have any suggestions? I've
> googled for the premature headers error and I'm thinking it's
> because of the first error? Could be wrong. Other scripts in
> the same directory run fine, and I can run the script at the
> command line.
> Any help is appreciated.
> James

What are the permissions on the .pl file.  Is it pointing to a valid perl
executable in the top of the script?


More information about the CentOS mailing list