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?
It had to do with ownership. One or the other has worked [for reasons that are not clear to me]:
Also, the following has made a difference:
[as opposed to chmod 644...again for reasons that are not clear to me]