RE: [Hampshire] Apache config & cgi-bin

Top Page

Reply to this message
Author: Bond, Peter
Date:  
To: Hampshire LUG Discussion List
Subject: RE: [Hampshire] Apache config & cgi-bin
> 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.


Xming to Outlook is not an ideal mixture...

Here's the blissfully unedited script:

#!/bin/sh

echo "Content-type: text/html



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

Test is running a shell script that echoes the content of this page to stdout

<P>"

echo "Date is " `date`

echo "<P>"
echo "Query string is "
echo $QUERY_STRING
echo "<P>"
echo REMOTE_ADDR = $REMOTE_ADDR
echo "<P>"
echo CONTENT_LENGTH = $CONTENT_LENGTH
echo "<P>"
echo Reading stuff from stdin
echo "<P>"
read STUFF
echo $STUFF
echo
echo "<P>"
echo Done reading stuff from stdin
echo "<P>"
echo "<p>"
echo "</body>
</html>

"



And... I've found what the problem was. User had set the perms to 777; suexec took umbrage at the idea that world+dog could write to the script, which seems kind of reasonable. However, given I was barking up the wrong tree assuming it was my config, I hadn't spotted it until a couple of minutes ago.

Thanks to all involved!

Peter

**********************************************************************

This email, its content and any attachments is PRIVATE AND
CONFIDENTIAL to TANDBERG Television, Part of the Ericsson Group.
If received in error please notify the sender and destroy the original
message and attachments.

www.tandbergtv.com
**********************************************************************