Can't get Apache to log errors
I have been trying to get php to put its errors into a separate log file: "php_log". In php.ini I set:
Here are some other settings you may or may not find relevant:
You didn't mention your distro, but I guess it's a rhel based one as it uses /var/log/httpd for logging.
Note that php writes its logs with the rights of the user running apache. In your case the apache user cannot create and write /var/log/httpd/php_log and so it keeps logging into apache error_log.
Unless you want to change the directory permissions (that is not advisable), you can change the location for the php_log to somewhere that can be written by the apache user (e.g. /tmp/php_log)
Also if you're using SELinux, check if it allows apache to write in /tmp
Thanks. That's what I needed to know!
And, yes on the rhel based... CentOS to be specific. Thanks again!
|All times are GMT -5. The time now is 09:50 PM.|