How do you log php errors with CakePHP when debug is 0?

Posted by Justin on Stack Overflow See other posts from Stack Overflow or by Justin
Published on 2011-02-05T00:38:45Z Indexed on 2011/02/08 23:25 UTC
Read the original article Hit count: 192

Filed under:
|
|

I would like to log PHP errors on a CakePHP site that has debug = 0. However, even if I turn on the error log, like this:

error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
log_errors = On

it doesn't log errors.

The problem is that even for a parse error that should cause the CakePHP environment to not load completely (I think), it still blocks the error from being logged. If I set debug to 3, it logs to the file without issue.

I am using CakePHP 1.2. I know this is apparently made easier in 1.3, but I'm not ready to upgrade.

© Stack Overflow or respective owner

Related posts about php

Related posts about cakephp