-1

How do I configure PHP to either use a production environment or a development environment in PHP 5.5.x?

In order for the errors that I want to display, I've un-commented 'Production Value: On' underneath the display_errors section, and 'Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT' underneath the error_reporting section.

However, what determines production vs. development? Is it a setting in php.ini, or somewhere else?

Edit: This is for my php.ini file. Perhaps I wasn't clear with my question. Currently, if I want my errors to display or not, I toggle the Production Value on or off.

So, in which case would I ever toggle the Development Value settings on or off? And what settings would determine (and where would it be determined) that the Development Value settings would be useful as opposed to the Production Value settings? (Hopefully this is clear, I'm not sure how else I can word it.)

David
  • 5,882
  • 3
  • 33
  • 44
Omnomnipotent
  • 87
  • 2
  • 6

1 Answers1

0

There are some values - like your mentioned ones - that you don't want to be enabled on a live system, for various reasons (security, speed, performance).

I think you have something else in mind. Some frameworks and tools (Magento 2, symfony, Laravel) can use different settings for different environments.

For example: on a dev server, you would like to enable debugging information, that might slow down your application a bit. On live you would like to debug less things.

https://symfony.com/doc/current/configuration/environments.html