How to log php error in a separate file?

Posted by Question Overflow on Super User See other posts from Super User or by Question Overflow
Published on 2012-12-17T10:50:08Z Indexed on 2012/12/17 17:05 UTC
Read the original article Hit count: 165

Filed under:
|
|

I just did an upgrade of my server to Fedora 17 and merged some configuration files containing .rpmnew into the existing ones. I have been successfully logging my php errors in a separate log file by keeping the following in php.ini:

log_errors = On
error_log = /var/log/php-errors.log

I am not sure why the errors are being logged to /var/log/httpd/error_log after the upgrade despite keeping the settings above.

Also,

$ ls -l /var/log/php-errors.log
-rwxrwxr--. 1 apache myself 232 Dec 13 16:49 /var/log/php-errors.log

shows that apache did own the php error log file.

What could be causing PHP errors to be logged into apache error log file?

© Super User or respective owner

Related posts about php

Related posts about apache