Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

can't configure apache to use perl program

0 views
Skip to first unread message

i-ar...@hongkong.com

unread,
Apr 29, 2002, 3:42:59 AM4/29/02
to
hi,

i used linux mandrake 7.2 as a web. And i installed apache is OK. And Perl is
also OK. However, i try to put a test.pl in the folder /usr/local/apache/cgi-
bin/.. and to have a testing. But the error message is Internal Server Error.

what can i do?

Thanks
Arthur
i-ar...@hongkong.com

Jim Kass

unread,
Apr 30, 2002, 1:10:03 AM4/30/02
to
First Step:

Look at your logfiles.

It may be that the directory for perl is not properly qualified at the head
of your script.. i.e.: #!/usr/local/bin/perl -w

Also, your script may be crashing independently of the apache server. Make
sure that the test.pl script compiles and runs from shell.

If you are still having an error, the error log probably has enough
information to explain what is happening.


-JK

Cookie

unread,
May 1, 2002, 9:31:40 AM5/1/02
to
I have the same problem.

There is already a test program in the cgi folder isntalled as default. It
prints the enviromental variables:-

#!/usr/bin/perl
##
## printenv -- demo CGI program which just prints its environment
##

print "Content-type: text/plain\n\n";
foreach $var (sort(keys(%ENV))) {
$val = $ENV{$var};
$val =~ s|\n|\\n|g;
$val =~ s|"|\\"|g;
print "${var}=\"${val}\"\n";
}

This is called 'printenv' and it functions fine.

I put a test script out of a tutorial in there:-

#!/usr/bin/perl
print "Content-type: text/html\r\n\r\n";
print "Hello, World.";

Now, if I save it as 'test.pl' I get the internal server error. IF I save it
as 'test' it works ok. So what gives?

Cookie


"Jim Kass" <jk...@alternativereality.com> wrote in message
news:B8F37893.1050%jk...@alternativereality.com...

Cookie

unread,
May 1, 2002, 9:34:11 AM5/1/02
to
Ohh forgot to mention apaches log appears to be identical no matteer whether
the script runs successfully or not. Theres just an entry for the file at
the bottom of the log. I can post this if you dont beleive me!!! :)

Cookie

"Cookie" <cook...@NOSPAMclara.co.uk> wrote in message
news:102025988...@triton.uk.clara.net...

0 new messages