Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Martin Lucas-Smith
April 4, 2005, 11:51 pm
rate this thread
I've noticed since moving from Apache1/mod_php4/linux to
Apache2/mod_php5/linux that when an error is produced by PHP and put in
the error_log, the date is no longer logged as well:
Apache1/php4/linux example in Apache error_log:
[Thu Jan 8 15:06:52 2004] [error] PHP Warning: opendir(/foo/bar/): failed to
open dir: No such file or directory in /blah/something/listing.html on line 84
Apache2/php5/linux example in Apache error_log:
[client 184.108.40.206] PHP Notice: Undefined variable: browserline in
/foo/bar/zing.html on line 18
Is there any way to restore this, either at PHP or Apache level?
There is an inconclusive note at
"As pointed out previously, PHP by default logs to the Apache ErrorLog.
Beware: the messages it logs do not conform to Apache's error log format
(missing date and severity fields), so if you use an automated parser on
your error logs, you'll want to redirect PHP's errors somewhere else with
the error_log directive."
But no mention that the behaviour has changed.
Re: Date in Apache2's error log when error caused by PHP
/* We use APLOG_STARTUP because it keeps us from printing the
* data and time information at the beginning of the error log
* line. Not sure if this is correct, but it mirrors what happens
* with Apache 1.3 -- rbb
I think you and rbb need to chat.