title: PHP error_log method doesn't write errors to my error log file
body: <p>The PHP error_log method does not write errors to the custom error log file.  It will only write to /var/log/apache2/php_error.log</p>
  
  <p>Here are the logging settings in my <code>php.ini</code>:</p>
  
  <pre><code>error_reporting = E_ALL &amp; ~E_DEPRECATED &amp; ~E_NOTICE
  display_errors = Off
  log_errors = On
  log_errors_max_len = 0 ; also tried with 9999999
  error_log = /var/log/apache2/php_errors.log
  </code></pre>
  
  <p>PHP writes its errors to the regular Apache error log (<code>/var/log/apache2/error.log</code>) rather than the one I specified above.</p>
  
  <p>Things I already tried:</p>
  
  <ol>
  <li>I stopped and restarted apache after changing the php.ini file</li>
  <li>The file <code>/var/log/apache2/php_errors.log</code> is 777 permissions and the file exists.</li>
  <li>There are no other overriding php.ini files. (There is /etc/php5/cli/php.ini but I'm not using cli).</li>
  <li>There are no other error_log = xxx settings further down the php.ini file which could overrule the first one</li>
  <li>phpinfo() says error_log = /var/log/apache2/php_errors.log (i.e. the correct file), both under Local Value and Master Value</li>
  <li>The test script I'm using to generate errors doesn't contain any ini_set calls</li>
  </ol>
  
  <p>(FYI: I'm using Apache/2.2.17 and PHP/5.3.5-1ubuntu7.2 on Ubuntu 11.04)</p>
  
  <p>What am I doing wrong?</p>