PDA

View Full Version : cgi help!!!!


tharris
10-04-2001, 09:42 PM
Guys, I keep getting an 500 Internal Server Error. I have other working CGI on my site and I can not figure out what is wrong with it, it's been frustrating me for the last 2 hours! :(

Here is the error log for it:

[Thu Oct 4 21:37:09 2001] [error] [client 24.15.170.212] File does not exist: /home/hpp/public_html/500.shtml

[Thu Oct 4 21:37:09 2001] [error] [client 24.15.170.212] Premature end of script headers: /home/hpp/public_html/cgi-bin/upload.cgi

[Thu Oct 4 21:37:09 2001] upload.cgi: Execution of /home/hpp/public_html/cgi-bin/upload.cgi aborted due to compilation errors.

[Thu Oct 4 21:37:09 2001] upload.cgi: syntax error at /home/hpp/public_html/cgi-bin/upload.cgi line 50, near ");"

[Thu Oct 4 21:37:09 2001] upload.cgi: syntax error at /home/hpp/public_html/cgi-bin/upload.cgi line 49, near ");"

I have included the upload.cgi that I am using. Maybe some on can figure out what is wrong with it!!

url link to the upload.cgi: http://hpp.100megsdns.com/cgi-bin/upload.cgi

Thank You!!!!!

Infinity
10-06-2001, 08:03 AM
Just off the top of my head, is the path to your directories right? Is your user name 'hpp' or are you using the paths first provided with the script? Sorry to be asking this if that's all been changed by you already :)
I'm just trying to gather some info first...

bolsterboy
10-06-2001, 02:39 PM
try putting this under the fist line of your cgi script:

use CGI::Carp "fatalsToBrowser";

this displays the errors on screen so that you can see where the problem is

Hope this helps a bit :)

s man
10-29-2001, 10:21 PM
the answer may be you uploaded it in binary and not ASCII.
in auto mode of ws_ftp it does not have .pl .cgi .pm for ASCII.
so reupload it in ASCII and see if it works.

josh
10-29-2001, 11:29 PM
Hi there,

Fixed the errors for you.

Just for your information, a syntax error has nothing to do with the way a file was uploaded, or the paths. It is an error in the way the perl has been written. In other words, something wrong with one of the "reserved" words or symbols.

The problems were as the logfile said, with line 49 and 50 right near the end of each line. There was 1 too many closing brackets and I have removed them and attached the fixed file to this reply.

If you find any other probs with it, I'll be happy to take a look at it for you when I get the time, just email me.

Regards,

Josh.