PHP error reporting – difference between E_ALL, E_ALL & ~E_NOTICE & ~E_ALL

I’m confused about this settings. What are the differences?

Here, I’m talking about the basic idea behind php error reporting. This is a PHP function which defines how PHP report errors to server error logs. The error_reporting() function sets the error_reporting directive at runtime. PHP has many levels of errors, using this function sets that level for the duration (runtime) of your script.

Did you ever face this problem on your cPanel account? The disk space increasing inadvertently without any reason. Here we need to find a permanent solution for this issue. The high disk usage is just because of large error logs on the account.


E_ALL : Everything

E_ALL & ~E_NOTICE : Report all errors except E_NOTICE

~E_ALL : Stop all

E_NOTICE :: This will be helpful to analyze programming related errors. Please check this for more details >> error_reporting <<

How can I change this from cPanel account?

If your server has CloudLinux and installed PHP selector you can set this settings from the cPanel itself. Please follow the steps pasted below:

1. Log into cPanel.

2. Move to “cPanel >> Software and Services >> Select PHP Version.”

3. Click on “Switch To PHP Settings.”

Select PHP Version

4. You can set/change error_reporting from there.

Select PHP Version1

If it’s not listed there, please contact your host. If the server does not support Cloud Linux and PHP selector, you can set this from the PHP configuration or by adding php.ini file.

[button color=”orange” size=”small” link=”” target=”blank” ]CloudLinux installation guide[/button]

Post navigation

Arunlal Ashok

Operations Engineer at Endurance International Group. Linux lover. Like to play on Linux console. I started this blog to share and discuss Linux thoughts.

Always happy for an open discussion! Write to arun (@) crybit (dot) com. Check about me for more details. About this blog and our strong members, check The team

Leave a Reply

Your email address will not be published. Required fields are marked *