Apache does not log php errors
There are usually two separate php.ini files for Apache and CLI - are you sure you're looking at the correct one?
Edit:
2 more options that I can think of:
- some Apache directive is messing with PHP's log path (or disabling the logging options, though that is very unlikely to be the case) - try setting an absolute path to the log file in php.ini (@Frosty Z has suggested something like this)
- I notice that your PHP installation has the Suhosin patch applied, which does several restrictive modifications in order to improve security. And while in theory there are sufficient permissions for a user in the
http
user group to write to the logfile - there's probably some suphp-like behaviour and when your script is accessed through the web it is executed with/as the username that is set as it's owner (file owner of the script that is) - try changing it.
In the past, I had no error logs in two cases:
- The user under which Apache was running had no permissions to modify
php_error_log
file. - Error 500 occurred because of bad configuration of
.htaccess
, for example wrong rewrite module settings. In this situation errors are logged to Apacheerror_log
file.
I had the same problem.
Setting log_errors_max_len = 0
in php.ini worked for me.
PHP manual:
Set the maximum length of log_errors in bytes. In error_log information about the source is added. The default is 1024 and 0 allows to not apply any maximum length at all. This length is applied to logged errors, displayed errors and also to $php_errormsg, but not to explicitly called functions such as error_log().