开发者

CakePHP - why aren't errors being reported?

I've stopped receiving error messages in my CakePHP app. Normally error messages are suppressed if you have debug set to 0; if it is 1 or 2 then you get the error message, (plus stack trace, etc.) But I don't get anything if there is an error, regardless of my debug setting. S开发者_如何转开发o if I introduce an error (syntax, logic, whatever) all I get is a blank page, with no indication of line number or anything. The error seems to be getting swallowed somewhere, but I can't find where. ini_get('error_reporting') returns E_ALL.

This did work, so I have almost certainly broken it myself. I just need some indication of where to start looking to try and fix it. Thanks!


you could start looking in yout initiasation methods to check if the debug setting has been changed somewhere to 0.
some places to start looking could be: AppController::beforeFilter() and the current controller's beforeFilter().
You could also have a look at the other hooks, just to make sure...

You can also try to issue a Configure::write('debug', 2); right before creating an erroneuous statement.


Check that there isn't a custom error handler which is hiding all the errors from you. The function which would define one is called set_error_handler.


Check if you're importing any 3rd party libraries which may set the error reporting to a different level.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜