Perl/CGI

PhilipL

Verified User
Joined
Mar 12, 2006
Messages
17
Hi,

I wanted to try out a installation from Installatron which installed Coranto but after the installation is complete I can't use it at all.

It keeps coming up with "Internal Server Error" when triyng to access it.

Looking at Coranto it is programmed in Perl.

I then tried a very basic Perl script which displays hello world and that came up with Internal Server Error.

I looked at the error logs and this is what it says:
"[Thu Apr 6 18:38:42 2006] [error] [client 81.158.154.145] Premature end of script headers: /home/user/domains/domain.net/public_html/perltest/hello.pl"

I've got the latest version of DA and it was a new installation a couple of days ago.

Any help would be very greatful.

Phil
 
Hiya,

Sounds like Perl/CGI executing isnt allowed or not configured for your account. Unless the scripts are triggering a mod_security filter.

Either way
create a .htaccess file, and place this in public_html . and put the following in the file.

Options +ExecCGI +Includes

and see if that works.
 
Hi,

Thanks for the info.

I tried it and it doesnt work.

I tried it in ssh/command line too. It works if I use "perl ./hello.pl" but it doesnt work if I use "./hello.pl".
It comes up with ": bad interpreter: No such file or directory".

Double checked all permissions for user/reseller and all allow CGI.

Any more ideas?

Thanks for the help.

Phil
 
Hiya,

you do have

#!/usr/bin/perl

at the top of the perl scripts?

or make sure that at the top of the script that it has the exact location to perl.
 
Hi,

yes that is at the top of the file.
I double checked it with vi in ssh and doing a locate perl confirms perl being there.

Phil
 
Hi,

I tried it in cgi-bin, same result.

For the perltest folder, I created a htaccess with the CGI options in.

Anything else or do I need to do a build all ?

Phil
 
Hiya

have you got the mod_perl module loaded ?
you can also try

<Directory /home/user/domains/domain.net/public_html/cgi-bin>
Options ExecCGI Includes

AllowOverride All
</Directory>

in the httpd.conf

basically anything in that folder will get executed.
 
Hi,

tried that. Same result with no luck.

This is what the error log reported.

Code:
failed to open log file
fopen: Permission denied
[Thu Apr  6 20:47:02 2006] [error] [client 81.158.154.145] Premature end of script headers:
/home/user/domains/domain.net/public_html/cgi-bin/hello.pl
[Thu Apr  6 20:47:02 2006] [error] [client 81.158.154.145] File does not exist:
/home/user/domains/domain.net/public_html/500.shtml
 
Phillip, would you be so kind as to tell us how you fixed it, so the archives will include help for everyone?

Thanks.

Jeff
 
Hi,

Yeah no problem.

I did what people would proberly not do, build all.
Didnt do all packages, just php, apache and perl.

I found it was the only option and as the server has nobody on except me.

Regards,
Phil
 
Back
Top