[CentOS] OT: Apache Script Problem

Thu Oct 20 22:33:21 UTC 2005
Thomas E Dukes <edukes at alltel.net>

 

> -----Original Message-----
> From: centos-bounces at centos.org 
> [mailto:centos-bounces at centos.org] On Behalf Of James Pifer
> Sent: Thursday, October 20, 2005 6:08 PM
> To: CentOS
> Subject: RE: [CentOS] OT: Apache Script Problem
> 
> On Thu, 2005-10-20 at 17:57 -0400, Thomas E Dukes wrote:
> >  
> > > -----Original Message-----
> > > From: centos-bounces at centos.org
> > > [mailto:centos-bounces at centos.org] On Behalf Of James Pifer
> > > Sent: Thursday, October 20, 2005 5:44 PM
> > > To: CentOS
> > > Subject: [CentOS] OT: Apache Script Problem
> > > 
> > > 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. 
> > 
> > Trying running dos2unix <filename>.  You'll have to fix your 
> > permissions afterwards.
> > 
> > 
> 
> Darn it! I swore I had already done that, but I looked back 
> at the history and I did it to one of the htm files, not the 
> script. That fixed it. 
> 
> THANKS!!!!!
> 
:-)  It's got me a few times, too!