How to: Set error_reporting in PHP.INI properly

sshYour new Centos 6.x server will quickly build up logs and the php.ini log is one that can get huge. If you only want to see real errors then you need no more than the following setting in your php.ini.

Edit your current PHP.INI

nano /etc/php.ini

Replace the error_reporting setting as follows

error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR

In the even that you require a less strict log level, you can change the entry when required, debug your session then promptly change it back.

Was this helpful?