title: Apache does not log php errors
body: <p>PHP via CLI successfully logs errors to /var/log/php_errors.log.</p>
  
  <p>But apache + php does not log errors.</p>
  
  <pre><code>[bla@notebook ~]$ apachectl -v
  Server version: Apache/2.2.17 (Unix)
  Server built:   May 19 2011 03:15:39
  
  [bla@notebook ~]$ php -v
  PHP 5.3.6 with Suhosin-Patch (cli) (built: Mar 23 2011 13:28:00) 
  Copyright (c) 1997-2011 The PHP Group
  Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
  </code></pre>
  
  <p>In <strong>php.ini</strong> I have:</p>
  
  <pre><code>display_errors = On
  error_reporting = E_ALL | E_STRICT
  log_errors = On
  error_log = php_errors.log
  </code></pre>
  
  <p>In <strong>httpd.conf</strong>:</p>
  
  <pre><code>ErrorLog "/var/log/httpd/error_log"
  </code></pre>
  
  <p>Permissions:</p>
  
  <pre><code>[bla@notebook /]$ ls -la /var/log/httpd/
  -rwxrwxr-x 1 root root 133351 21.11.2011 11:18 access_log*
  -rwxrwxr-x 1 root http   1307 21.11.2011 11:18 error_log*
  
  [bla@notebook /]$ ls -la /var/log/php_errors.log 
  -rwxrwxr-x 1 root http 521 14.11.2011 17:31 /var/log/php_errors.log*
  </code></pre>
  
  <p>As you can see the Apache daemon has permissions to write into log files.</p>
  
  <p>Still no errors from Apache or PHP in /var/log/php_errors.log and /var/log/httpd/error_log.</p>
  
  <p><strong>UPDATE 1.</strong></p>
  
  <p>Changed this line in php.ini:</p>
  
  <pre><code>error_log = php_errors.log 
  </code></pre>
  
  <p>to full path:</p>
  
  <pre><code>error_log = /var/log/php_errors.log 
  </code></pre>
  
  <p>Permissions were ok. But if someone is also having problems with it, you can debug setting permissions to logfile 0777 or changing file owner.</p>