500 internal server error

drf1229

New Member
Messages
71
Reaction score
1
Points
0
I keep getting a 500 internal server error whenever I try to run a cgi script. It looks like this: http://www.algebrahelper.x10hosting.com/cgi-bin/test.cgi
I don't get it because this is all I have in my script:
PHP:
#!/usr/bin/perl
use strict;
use warnings;
print "Content-type: text/html\n\n";
print "Hello, World...\n";
and my permissions are set to 755. I'm completely new to this so any advice is greatly appreciated.
 

descalzo

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

use strict ;
use CGI::Carp qw(fatalsToBrowser);
use warnings;
print "Content-type: text/html\n\n";
print "Hello, World...\n";

Try it with the added line.
And as I post this, the link you posted came up a 404 Missing

Also, if you uploaded the script from a Windows machine, try uploading it again in ASCII mode.
 
Last edited:

drf1229

New Member
Messages
71
Reaction score
1
Points
0
Hey thanks for your response! Sorry about the missing link, I renamed the file to do something and forgot to change it back. I changed it back so the link now works. I tried the script with the added line, but I still have the same error. I didn't upload the file from my computer but just created it in the legacy file manager. Could this be the problem?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Log onto cPanel
Scroll down to Logs section
Click on Error Log

See if there are any recent entries.

Also, I would drop use warnings. Just personal pref.
 
Last edited:

niu111

New Member
Messages
1
Reaction score
0
Points
0
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, support@x10hosting.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

I'm getting the same thing trying to access my phpBB forums and separate programs in PHP. What's up?
 

drf1229

New Member
Messages
71
Reaction score
1
Points
0
When I clicked on the error log, I got the following error:
Code:
[Sun Feb 28 15:19:53 2010] [error] [client 68.50.28.230] File does not exist: /home/drf1229/public_html/500.shtml
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
That is just because you/x10 does not have a 500 error page.
If it were permissions, the error log would have said that.
Try creating a whole new file with the same code typed in and see if that runs.

Also, make sure the #! line is the absolute first line.
 
Last edited:

drf1229

New Member
Messages
71
Reaction score
1
Points
0
Hmm... I tried creating a blank file with the same code typed in and came up with the same error. (http://www.algebrahelper.x10hosting.com/cgi-bin/test2.cgi). I also created my own 500.shtml file. When I do this, I no longer get errors in the log, but its still going to an error handler, so obviously there are still problems. Do you think I should try creating the file on my computer (mac) and then uploading it?
 
Top