Forum Moderators: coopster & phranque

Message Too Old, No Replies

all cgi scripts end with 500 internal server

         

confined

1:26 am on Nov 2, 2006 (gmt 0)

10+ Year Member



I'm at my wits end here..

I configured and built mod_perl with the latest perl installed.

perl Makefile.PL EVERYTHING=1 APACHE_SRC=../apache_1.3.37/src USE_APACI=1 DO_HTTPD=1 APACHE_PREFIX=/home/httpd

then i did make && make test && make install

everything was fine.

then I went down to apache_1.3.37 and did

./configure --prefix=/usr/local/apache/bin --activate-module=src/modules/perl/libperl.a --prefix=/usr/local

then make, make install

I have scriptalias, Options ExecCGI or whatever its called in httpd.conf

I can execute the scripts from the command line.

doing ./test.cgi in the cgi-bin folder of my website works. It outputs the script. But when i try accessing via web it gives 500 internal server error.. then in apache logs it says Premature end of headers

I've tried setting chmod 755, even chmod 777, but to no avail.

I've even changed the user permissions from root, to nobody, to apache.

Apache runs as user apache in group apache.

Nothing is working and i'm going nuts.

I bet it's so simple, but I'm such a newbie at perl and stuff.

If anyone can shed light i'd be appreciative.

It is probably just apache since I tried compiling it a dozen times.

thanks, this is kind of urgent so I'd appreciate expedited responses.

confined

1:28 am on Nov 2, 2006 (gmt 0)

10+ Year Member



oh yeah, the script I'm executing is just:

#!/usr/bin/perl -w
print "Content-type: text/html\n\n";
print "perl does not work!\n\n";

and yes it's in ASCII mode

perl_diver

5:08 pm on Nov 2, 2006 (gmt 0)

10+ Year Member



make sure the first line is corret:

#!/usr/bin/perl

if you are running apache under windows you should maybe use:

#!perl

or

#!c:/perl/bin/perl.exe