Problems reading error.log from CGI script (Windows)

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

 



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.log file 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
[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux