[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] cgiwrap problem running cgi script



> I am having trouble executing a cgi script on a site.
> 
> When it is called through the web I get the error message:
>    The server encountered an internal error or
>    misconfiguration and was unable to complete your request.
> 
> and when I look at the apache logs I see the error:
> 
>    Premature end of script headers: /usr/cgiwrap/cgiwrap
> 
> Now Ive tested this script from the command line and it runs 
> perfectly, but
> it seems to return this error when called throught the web.
> 
> 
If the script runs from the command line, the most probable problem
is the one errored on.
Ensure your script is sending the header.
ie, before you print anything to the output (http connection) 
you should have 

	print "Content-type: text/html\n\n";

Unless you are trying to plant a cookie in which case the last \n 
should be left off until after planting the cookie.

Paul ASI.