Forum Moderators: coopster & phranque

Message Too Old, No Replies

Internal Server Error (500) - help

         

Acternaweb

3:37 pm on Jun 11, 2001 (gmt 0)

10+ Year Member



I am getting the following error from a cgi script that I am running, however I do not have access to the server log (an inquiry was sent to my hosting company, but no response yet)...

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

Please let me know what I can do. I am trying to run guestbook script and an email this page script. Currently I have an feedback from that works using cgi/perl.

Thanks,

Paul

sugarkane

3:41 pm on Jun 11, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



First check that you have set the permissions correctly on the scripts - ie they must be 'executable'. Next, make sure you've uploaded the scripts using ASCII transfer rather than binary.

If those two don't work, it's probably a syntax error or other bug in your scripts...

Brett_Tabke

3:51 pm on Jun 11, 2001 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Do you have telnet?

If so, telnet into a command line into the directory where the script is at. They try:

perl -cw yourscriptname.pl

Where yourscriptname.pl is the name of the script file. The -cw switches will do a synatx check on the script. If that comes back with no errors, just try perl yourscriptname.pl once and see what it says.

Acternaweb

4:08 pm on Jun 11, 2001 (gmt 0)

10+ Year Member



HI I don't use telnet. I have the settings for html as 644 and the cgi is 755.

Do I need blat.exe for the mail program? Currently in the script I have:

$MAIL_PROGRAM="/usr/lib/sendmail -t";

Thanks again

sugarkane

4:20 pm on Jun 11, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you're on an NT server then yes, you will probably need blat. On a unix server sendmail will almost certainly be okay.

What does the working feedback form script use for email?

Acternaweb

4:42 pm on Jun 11, 2001 (gmt 0)

10+ Year Member



On the feeback form I have
$SENDMAIL = '/usr/lib/sendmail';

but on the guest book they said the the "-t" is important.

The site is on a unix server.

Thanks again for your help. Im am very new to programing and trying to get my feet wet.

sugarkane

6:40 pm on Jun 11, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The '-t' wont be a problem, it's just a security feature of sendmail (it tells sendmail to ignore any data passed via the command line).

You could try putting

use CGI::Carp qw(fatalsToBrowser);

at the top of the script - this will try and send any error messages to your browser as well as to the server logs and might give you a clue to the problem.

Some other things to check: if the script writes to a file, does it have write permission for that file? Does it have write permission for the directory containing that file?

madcat

2:01 am on Apr 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



----fixed----

lak12

11:14 am on Apr 14, 2002 (gmt 0)

10+ Year Member



Juas a small thing to consider...
Instead of mod 755 I use 711 - the same result but a bit better security
Mark.