Re: [Hampshire] Apache config & cgi-bin

Top Page
Author: Hugo Mills
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Apache config & cgi-bin

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x58562100.hantslug.org.uk.18526': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Tue May 22 11:32:06 2007 BST
gpg: using DSA key B2C27BC21C335860
gpg: Can't check signature: No public key
On Tue, May 22, 2007 at 10:03:42AM +0100, Bond, Peter wrote:
> > > Symptoms are "Premature end of script headers" in the error log.
> >
> > This implies that the file is being interpreted as a script
> > to be run - so
> > you can stop looking at your Apache config.
>
> Good start, thank you.
>
> > Your problem is that the script is not returning a vaild hmtl
> > page; this
> > almost always means that the script had failed.
>
> It's almost too Mickey Mouse to fail:
>
> #!/bin/sh
> echo "Content-type: text/html


I could be wrong, but shouldn't there be an empty line here? The
"Content-type" header is a part of the HTTP response, and will be
added to the HTTP headers. The <html> following is part of the
document payload.

> <html>
> <head>
> <title>CGI test</TITLE>
> </head>


As Vic pointed out, there's a missing close quote here.

> echo "Query string is "

[snip]

Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 1C335860 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
  --- But people have always eaten people,  / what else is there to ---  
         eat?  / If the Juju had meant us not to eat people / he         
                     wouldn't have made us of meat.