Open the method of error Reporting in PHP for your reference.
There are many configuration settings in the php.ini file. You should have set up your own php.ini file and put it in the appropriate directory, as shown in the documentation Instructions for PHP and Apache 2 on Linux.
When debugging a PHP application, you should know two configuration variables. The following are the two variables and their default values:
Copy Code code as follows:
Display_errors = off error_reporting = E_all
By searching for them in the php.ini file, you can find the current default values for these two variables. The purpose of the display_errors variable is obvious-it tells PHP if it shows an error. The default value is off. However, to make the development process easier, set this value to On:display_errors = On
The default value for the error_reporting variable is e_all. This setting displays all information from bad coding practices to harmless hints to errors. E_all is a bit too thin for the development process because it displays hints on the screen for trivial things, such as variable initialization, and can mess up the browser's output. I just want to see errors and bad coding practices, but don't want to see harmless hints. Therefore, replace the error_reporting default value with the following values: error_reporting = e_all & ~e_notice
Reboot Apache, complete configuration.