Help - Search - Members - Calendar
Full Version: 500 Internal Server Error
The Planet Forums > Control Panels > Plesk
Jacob
Hi,

Im trying to run a cgiscript and the 500 error gets returned....

- I have tried to chmod to both 755 and 777 - no go.
- I have tried a "hello world" cgiscript and that works.

What could be wrong with this then? The cgiscript is coded in c++ if that makes a difference.

Rgs
Jacob
LadyHawk
Jacob ,

Make sure that you have uploaded your script in ascii mode and that only cgi/pl scripts are in the cgi-bin. All .txt and other file extensions have to the in the httpdocs folder.
Jacob
It was an tar.gz file I uploaded and gunziped/tar -xvpf through ssh. It unpacked correctly but now I get the 500 error. I think my server has some fundamental errors icon_wink.gif
Rich2k
A 500 error could pretty much mean ANYTHING. bad coding, incorrect file location, missing module, etc

Have a look in your suexec logs or your error log for anything more detailed.
James
Jacob, are you sure that it got unpacked w/ the correct owner? I had to chown a script after doing that, but that was ensim so...
Jacob
The error log said this:

QUOTE
[Sat Apr 19 04:05:23 2003] [error] [client MYIP] Premature end of script headers: /home/virtual/site1/fst/var/www/cgi-bin/at/admin.cgi
[Sat Apr 19 04:05:58 2003] [error] [client MYIP] Premature end of script headers: /home/virtual/site1/fst/var/www/cgi-bin/at/admin.cgi
[Sat Apr 19 04:06:31 2003] [error] [client MYIP] Premature end of script headers: /home/virtual/site1/fst/var/www/cgi-bin/at/help/help1.cgi
[Sat Apr 19 04:06:36 2003] [error] [client MYIP] Premature end of script headers: /home/virtual/site1/fst/var/www/cgi-bin/at/admin.cgi
[Sat Apr 19 04:06:38 2003] [error] [client MYIP] Premature end of script headers:


This is a quote from the owner of the script
QUOTE
A premature end of script header means that apache never received a http header, and thus couldn't figure out what to send to the browser, and what to keep on the server. The script however, does send this header (otherwise it wouldn't work on any site at all).So it looks like your server redirects cgi files to something else besides apache first.


The script supposedly work on other servers so I think it is mine that has a wrong configuration somewhere.

Rgs
Jacob
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.