The easy way is: manually check the apache configuration file httpd.conf (which often lives in /etc/ or /etc/httpd, but can be anywhere) and find out where the error log goes, then set that as the value of a scalar.
The second is to have your script parse the httpd.conf file and figure out the location of the error file itself. I really don't recommend the second though; first, it's not a value that's likely to change and second, you really don't want your script to go digging through a file with potentially sensitive information (for that matter, this goes for the error logfile).
I note, also, that if your script fails to compile (thus, sending out no headers), you'll still get bupkus information through this method. Make your scripts bomb with useful info while you're developing, say, by using
or some such.use CGI::Carp qw(fatalsToBrowser);
HTH
Philosophy can be made out of anything. Or less -- Jerry A. Fodor
In reply to Re: Reading the last fews lines of the Apache error log
by arturo
in thread Reading the last fews lines of the Apache error log
by markjugg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |