1

I using Zend Framework 2 and PHP built-in server.

Zend documentation says:

Optionally, when using Apache, you can use the APPLICATION_ENV setting in your VirtualHost to let PHP output all its errors to the browser. This can be useful during the development of your application.

I want to be able to see all errors when I run the "php-built-in-server" on my machine.

But if I set $_SERVER['APPLICATION_ENV'] = 'development' at the beginning in index.php it can be difficult to work with public (dev) GIT remote and (deployment) private remote. Everytime when I have to commit something I have to change the $_SERVER['APPLICATION_ENV'] for each environment - in each commit.

Is there a way to set a $_SERVER[] variable without affecting the actual code?

Ifch0o1
  • 900
  • 1
  • 14
  • 32

0 Answers0