www.vadtec.net [EMAIL PROTECTED] ----- Original Message ----- From: "Bob Showalter" <[EMAIL PROTECTED]> To: "'Nicholas Davey'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, June 18, 2003 8:41 AM Subject: RE: Problem with script headers.
> Nicholas Davey wrote: > > Hi. > > > > Okay, I have been over my script about a hundred times, and > > all my syntax is perfect. However, when I view my page on the net, I > > get this: > > > > Internal Server Error > > The server encountered an internal error or misconfiguration > > and was unable to complete your request. > > Please contact the server administrator, [EMAIL PROTECTED] > > 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. > > > > > > > > When I check the error log, I get this back (this is the last > > three line of the error log, cause the last 50 entries are all the > > same): > > > > > > > > failed to open log file > > fopen: Permission denied > > [Fri Jun 13 07:45:57 2003] [error] [client > > 64.207.81.146] Premature end of script headers: <path removed > > for security reasons>/cgi-bin/index.cgi > > When the server executes your CGI script, it directs STDERR to the error log > file. It then executes your script and captures the STDOUT, looking for the > MIME headers. It will add some more headers before sending the response back > to the client. > > The first two lines above: > > failed to open log file > fopen: Permission denied > > are being produced by your script. Presumably, your script is calling die() > or exit() either directly or indirectly after emitting this message. > > The third line: > > [Fri Jun 13 07:45:57 2003] [error] [client 64.207.81.146] Premature > end of script headers: path removed for security reasons>/cgi-bin/index.cgi > > is produced by the web server. Your script died before the MIME headers had > been written, so the server was unable to find the headers in the STDOUT of > your script. This error is also produced if your script has a syntax error > (and thus dies during the compile phase). > > So, you need to find the point in your script where it's opening some kind > of log file and deal with the permission violation. Remember that the web > server runs under its own user id, so that user id will need appropriate > permissions in the files and directories you're tyring to access here. > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]