Search code examples
zend-framework2

Zend Framework 2 Additional error information missing in local setup


I set up zend app, I got 500 error with message

An error occurred
An error occurred during execution; please try again later.

Missing Additional information part

do I need to setup dev environment variable or something?

I can't figure out the problem


Solution

  • You could display more information about the error by setting php error displaying to true directly in your php.ini file, or in your index.php file.

    In the index.php file, you could do that as follows :

    <?php
     error_reporting(E_ALL);
     ini_set('display_errors', true);
    

    EDIT :

    Also make sure to set display_exceptions to true in your module.config.php file :

    <?php
      return array(
      //...
    
     'view_manager' => array(    
     'display_not_found_reason' => true,
     'display_exceptions'       => true, //set this parameter to true
      
     //...