views:

28

answers:

1

Hi,

I'm working with PHP and have got the error logging turned on and turned up with:

error_reporting = E_ALL | E_STRICT

log_errors = On
error_log = /path/to/file
display_errors = Off

Now this log files catches most PHP errors but occasionally I will make a change and have the page fail to display with no logging to the file.

A specific example of this is if I do:

 interface InterfaceClass
 {
     public function someFunction();
 }

 class InterfaceInheriter implements InterfaceClass
 { 
     final public function someFunction()
     {

     }   
 }

  class FirstDerived extends InterfaceInheriter
  {   
      public function someFunction()
      {

      }
 }

Now this is all well and good, and i'm sure I have made some error, but where can I get the feedback from the interpreter for this?

ANSWER: Since i'm using Wordpress it turns out that it was somehow filtering out some log messages. I fixed it in the end by setting the appropriate logging configuration for Wordpress.

Thanks for the help!

+1  A: 

try placing error_reporting(E_ALL | E_STRICT); in the file..

nathan
It's already set in php.ini. Why would it need to be set again with a function?
icktoofay
if the file was included and another script higher up the execution chain was setting error_reporting with a function too.. - simple thing to try for an easy catch when debugging..
nathan
tried it and the errors get logged correctly. I'm using Wordpress so now I just have to work out what stupidity it is doing to selectively filter my error logs.
radman