Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

500 Internal Server Error

Status
Not open for further replies.

heggeman

Programmer
Jun 13, 2000
5
GB
I am new to CGI scripting, God bless...

But why do I get the following error?


Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@free.prohosting.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.



The server I use claims to support CGI. I just called a simple script that I copied of the FAQ sheet here,


#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
print &quot;<HTML><HEAD><TITLE>A NEW CGI PAGE</TITLE></HEAD>\n&quot;;
print &quot;<BODY><P>Hello World</P></BODY></HTML>&quot;;


Help!

Thanks a lot,


Bas
England
 
Bas,

Make sure that a) the script is marked as executable and b) that Perl really is located in /usr/local/bin and not (perhaps) /usr/bin/local.

Hope this helps...

-- Lance
 
I have gotten that error with perl scripts that have had returns in the code. I use a great text editor called SynEdit (free download from cnet.com) that has a neat little feature... it converts the script from Dos to Unix, basically it just strips the returns out of the doc, which will cause that 500 error. Alsomake sure the perl location is correct as has already been explained. And make sure that any files that your program is writing to or calling from are CHMOS correctly, and that the directories they reside in are CHMOD correctly. When in doubt, deny all terms and defnitions.
 
If you get this error in test code you can add the following line after the shebang line:

use CGI::Carp qw(fatalsToBrowser);

which should give you a better explanation as to why the code failed. Remember to remove it from production code though.

Failing that look in the logs to see if there are any indications there.

HTH,
Barbie. Leader of Birmingham Perl Mongers
 
Hello maybe you habe transfer the script in Bin and not in ASCCI ! You must upload the script in ASCCI that is very importent !
CU Henning
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top