[H-GEN] CGI internal server error
David Wood
dwood at plugged.net.au
Fri Oct 16 20:36:16 EDT 1998
> On Fri, 16 Oct 1998, Martin Pool wrote:
> > Yeah, I was mostly joking. But I've spent more time than I care to
> > think about looking for missing quotes and similar things in Perl.
Most CGI-related errors that you get from Perl scripts will be of the
"script returned inappropriate headers" variety. These are often due to
STDERR messages generated early in the script due to failures to load
modules, etc. IMHO the easiest way to solve these kind of errors is to
return a valid set of HTTP headers early in the script.
The trivial HTTP header from perl is:
print "Content-Type: text/html\n\n"; # Note the blank line
The other reason for this error would be a syntax problem, which can be
checked on the command line with a perl -c.
If you still get the same error from a browser, it is almost always
permissions.
Cheers,
Dave
------------------------------------------------------------------
David Wood | Telephone: +61 7 3876 7140
mailto:dwood at plugged.net.au | Facsimile: +61 7 3876 7142
http://www.plugged.net.au | PGP Key available via finger
------------------------------------------------------------------
Those who do not understand Unix are condemned to reinvent it, poorly.
- Henry Spencer, University of Toronto Unix hack
More information about the General
mailing list