mariachimike Posted October 11, 2007 Share Posted October 11, 2007 This issue may be more Apache related, but here goes anyway: I've set the following values in my php.ini file: log_errors =On error_log_ =/var/log/php_log However, all PHP errors still end up in the Apache error log and the php_log file is still empty. I want to separate PHP errors from the Apache errors to make it easier to search. Is there some other setting I need to set in order to make Apache log PHP errors to the file I chose in my php.ini? Quote Link to comment https://forums.phpfreaks.com/topic/72735-solved-php-error-logging-in-apache/ Share on other sites More sharing options...
mariachimike Posted October 11, 2007 Author Share Posted October 11, 2007 Well, the solution was a bit strange. My original log location was this: /var/log/httpd/php_error_log After failing with 777 permissions and changing to the owner to "apache", I moved the log to this location: /var/log/php/php_error_log and voila! It worked! So, my theory is that if you put the PHP error log in the same directory where Apache is doing its logging, it will log your PHP errors to the Apache error log and not the file you set in your PHP configuration. Quote Link to comment https://forums.phpfreaks.com/topic/72735-solved-php-error-logging-in-apache/#findComment-366860 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.