I have a simple CGI script that displays the error log from my Windows
apache 2.2.4 server.
It uses the "TYPE" command to take a quick copy of the error.log file, like
this:
TYPE error.log >temp.log
Then it processes the file temp.log into an html table.

This works perfectly the very first time I use it, but subsequent attempts
get an error from the "TYPE" command, implying that access to the
error.logfile has been denied.
If I restart apache, it will work once more.

This is manageable apart from one problem. I make lots of errors while I'm
developing new CGI scripts, and it is very cumbersome having to restart
apache after every error!

If, instead of using my CGI script to display the error log, I just use
"TAIL" on the actual log file (in a command prompt window) then I can
inspect the log as often as I like (as long as I don't run the CGI log
displayer; once I've run this CGI script, even "TAIL" won't display the
log). This is what I'm doing now, but I'd like to know why my CGI script
works only once.

--
Steve Swift
http://www.swiftys.org.uk

Reply via email to