Friday, 6 September 2013

LAMP: Can't get PHP errors to go to a log file (other than the Apache log)

LAMP: Can't get PHP errors to go to a log file (other than the Apache log)

On a Ubuntu web server [LAMP], I'm trying to get PHP errors to write into
a php_error file, but no matter what I do, they keep going to the apache
log.
Here's what I have tried/done:
Edited the php.ini file:
error_reporting = E_ALL | E_STRICT
display_error = Off
log_errors = On
error_log = /var/log/php_errors.log
Restarted apache
Checked the phpinfo() output to verify that the changes I made to the
php.ini file took -- they did.
After verifying that the errors were still going to the apache log, I
physically created the php_errors.log and tried again. Still going to the
apache log!!
Rebooted the web server! Still ...!!!
Anybody have a solution?

No comments:

Post a Comment