500 Internal Server Error

Status
Not open for further replies.

cmo0118

New Member
Messages
9
Reaction score
0
Points
0
Hello,

I am a newbie here and just uploaded two simple perl files and one .htaccess. But I linked this : http://cmo.x10hosting.com/aa/modperl-test.pl , I came across a Internal Server Error. My .htaccess looks like this :

<FilesMatch "modperl-test.pl">
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options +ExecCGI
PerlSendHeader on
</FilesMatch>

Does anyone happen to know why? Where can I find the server error log of my running program? Thanks a lot.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
I am almost certain that the free servers do not have mod_perl, hence the line

PerlResponseHandler ModPerl::Registry

will cause the 500 error whenever .htaccess is read

Edit/Add

[Sat Jan 09 12:14:03 2010] [alert] [client 130.65.109.103] /home/username/public_html/cgi-bin/.htaccess: Invalid command 'PerlResponseHandler', perhaps misspelled or defined by a module not included in the server configuration
 
Last edited:

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
As for the error log, look in the file manager for a file named error_log, and if you find none, inside cPanel there is a icon labelled error log.

- xav0989
 

cmo0118

New Member
Messages
9
Reaction score
0
Points
0
I am almost certain that the free servers do not have mod_perl, hence the line

PerlResponseHandler ModPerl::Registry

will cause the 500 error whenever .htaccess is read

Edit/Add

Thanks, descalzo. I think you are right. But how do I know which modules does this x10hosting support or not? Can I install mod_perl under my directory?
 
Last edited:

cmo0118

New Member
Messages
9
Reaction score
0
Points
0
Also, I am pretty sure that cgi scripts do not work outside cgi-bin, unless you do some redirection. As for perl, I can assure you that is works: http://afrosoft.co.cc/cgi-bin/hello.pl

- xav0989

That's awesome. I remove .htaccess and upload a test.pl that only print "hello" but still no luck. Do I need to configure anything to make it work?

http://cmo.x10hosting.com/cgi-bin/test.pl
======================
#!/usr/bin/perl

BEGIN { push @INC, "/home/YOURACCOUNTNAMEHERE/public_html"; }

print "hello world";
======================

I can not find file manager ><. I used ftpzilla to connect to my root dir and there are several folders under it such as etc, mail, public_html, tmp, www...etc. Do you mean the error_log is under one of them?
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
#!/usr/bin/perl

BEGIN { push @INC, "/home/YOURACCOUNTNAMEHERE/public_html"; }

print "Content-type: text/html\n\n";

print "hello world";

Without mod_perl sending headers, you have to do it yourself.
Edit:
I can not find file manager ><. I used ftpzilla to connect to my root dir and there are several folders under it such as etc, mail, public_html, tmp, www...etc. Do you mean the error_log is under one of them?

Two types of error log. PHP files will create/append to an error_log file in their directory when they have an error in the script. Perl doesn't. Not sure about Python.

Apache logs other types of error. Not sure where in the directory tree it is kept, but you can see it by using cPanel. It has an icon for it in the Logs section.
 
Last edited:
Status
Not open for further replies.
Top