I've reinstall my system and now when something wrong in zf2 i cant see the error on the page only in nginx error log, the display_errors On and display_startup_errors On, in php.ini, maybe something with my php-fpm settings? And in the simple php file not in zf2 i have see the errors!
相关问题
- Why does recursive submodule update from github fa
- How do I identify what code is generating “ '&
- How can I prevent my Shiny App from disconnecting
- Can't configure nginx as a proxy for tomcat wi
- How to set Nginx URI to fix empty URI in redirect
Zend framework 2 will merge configs from all loaded modules, so you need to ensure that you already set 'display_exceptions' (if that key exists) to true in all modules's config file.
You can see which modules are loaded in your application.config.php file
ini_set('display_errors', true);
in my index.php now show me the errorsYou need enable the following options in your config
Remember turn off this in a production environment
In my case Zend errors and NGinX - php5 fpm, work like this:
Only I put in
public/index.php
(@AlloVince)Without
If(){...}
But If only to put above code, display error, will give this:
Another thing! Set up this code: (@To Nong)
in
module.config.php
like this:),
I get all errors of an error log on screen:
I didn't touch config file as php-fpm in system (Ubuntu 14.04).
You can combine the above with an environment check:
Add this to your public/index.php at the top:
And this one to your public/.htaccess:
SetEnv "APP_ENV" "development"
Add this to your public/index.php