Anthony
Anthony

Reputation: 3218

Zend Framework: how to get message instead of Internal Server Error?

For example, we have IndexController. Application.ini - all log errors are true:

phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1

I tried to set up ini_set('error_reporting', E_ALL);

At last in indexAction I'm writing:

Zend_Auth::hasIdentity();

After this one I have got Internal Server Error.

This is clear, because we cannot run hasIdentity() as static. I can get a var_dump in this function but when I run $this->getStorage() init I have got Internal Server Error.

So I would like to get some error message with description. No like Internal Server Error.

If I doing smth like this in a simple php application (not Zend Framework) - I have got a full error description without Internal Server Error.

So how to get description instead of Internal Server Error there?

Upvotes: 1

Views: 1063

Answers (1)

Marcin
Marcin

Reputation: 238081

From what you wrote it seems that your APPLICATION_ENV is not set to development. You can set APPLICATION_ENV to development in your public/.htaccess by adding the following line SetEnv APPLICATION_ENV development into your .htaccess.

Upvotes: 3

Related Questions