Re: cgi counter script

derek@pipex.net
Wed, 7 Jun 1995 10:08:09 +0100


From: derek@pipex.net
Date: Wed, 7 Jun 1995 10:08:09 +0100
Message-Id: <199506070908.KAA00442@khazi.pipex.net>
To: lisajoy@turbo.kean.edu
Cc: Multiple recipients of list <www-html@www10.w3.org>
Subject: re: cgi counter script
In-Reply-To: <Pine.OSF.3.91.950605100742.8051A-100000@turbo.kean.edu>

lisajoy@turbo.kean.edu writes:
> Hello.  I have run into a weird problem with a cgi script I am trying to 
> use.  I have a script "test.html" in my cgi-bin directory.  It has been 
> written to produce a count of hit on a page.  When testing this script at 
> the command line, it works, and produces the desired result.  However, 
> when I attempt to run the script through the broweser, I get a message 
> "data file empty" or something similiar to that.  All rights have been 
> set correctly.  Any ideas?
> 
You really need to emulate the environment your httpd runs the script under
e.g. su to the user which the httpd runs as and set the appropriate environment
variables to run the script, this often helps to identify the problem.

Derek
---
Derek Harding                                                   derek@pipex.net
Webmaster and Product & Software Developer                  +44 (0) 1223 250422
Unipalm PIPEX                                http://www.pipex.net/people/derek/
-------------------------------------------------------------------------------
The duke had a mind that ticked like a clock and, like a clock, it regularly
went cuckoo.
       -- (Terry Pratchett, Wyrd Sisters)