简体   繁体   中英

zend framework 2 error reporting

I'm having some problems getting zf2 to log errors or report them under some circumstances.

Some errors will be reported to screen and the error.log but others are not and just result in a blank screen. There doesn't appear to be any reasoning behind what does get displayed and what doesn't.

I have error reporting enabled in my php ini set to E_ALL and I have added

'display_not_found_reason' => true,
'display_exceptions'       => true,

to my module config, and I have also tried setting the error reporting values directly in the index.php

At the moment im trying to use doctrine and just getting a blank screen...

https://packagist.org/packages/webino/nette-debug

Link listed above is one of the most useful debug tools I've found so far for zf2. It picks up 99.9% of the errors and the configuration allows you to log it to a specific log file in your directory. However there is that .1% that it doesn't catch and that generally does go through to the syslog so you should be able to find out more details there. Just make sure you initialize the nette debug module as the first module in the stack.

Hope this helps you, I got really sick and tired of those issues too up to the point where where I found nette.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM