|
How can I see if a cgi script is the fault of my script or the fault of the server? -
11-11-2004, 09:23 PM
How can I see if a cgi script is the fault of my script or the fault of the server?
We get a lot of requests for troubleshooting scripts and unfortunately do not have the resources to provide that service on the 10,000 or so sites we host. Many customers are left wondering if it is a server issue that they can't seem to get out of the dreaded 500 server error. We can assure you that it isn't the fault of ther server.
Most often it is due to syntax errors or permissions in the script itself. Logging in via SSH will identify the problem sometimes by running the script from the command line and looking at the errors produced. (e.g. perl myscript.pl) You also want to make sure the scripts aren't set to chmod 777 or it will also fail to run.
In the end, learning how to and getting scripts to run on the server is the responsibility of the end user and we cannot troubleshoot non running scripts. You can check to see if it is that cause of the server by running a simple hello world script (below)
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello, world!\n";
(edit - backslashes got stripped somehwre, thanks for noticing midwest)
|