PHP Error Report
The PHP. ini file contains many configuration settings.
Debugging PHP applicationsProgramYou should know two configuration variables. The two variables and their default values are as follows:
Display_errors = offerror_reporting = e_all
By searching for these variables in the PHP. ini file, you can find the current default values of these two variables.Display_errorsThe purpose of the variable is obvious-It tells PHP whether an error is displayed. The default value isOff. However, to make the development process easier, set this valueOn:
Display_errors = on
Error_reportingThe default value of the variable isE_all. This setting displays all information from poor coding practices to harmless prompts to errors.E_allThe development process is a little too detailed, because it displays a prompt on the screen for some trivial matters (for example, the variable is not initialized), it will mess up the browser output. I only want to see errors and bad code practices, but do not want to see harmless prompts. Therefore, replace the following valuesError_reportingDefault Value:
Error_reporting = e_all &~ E_notice
Restart Apache and set all the settings.
Server Error Report
Add the following lines to httpd. conf to overwrite any PHP. ini file:
Php_flag display_errors onphp_value error_report 2039
This will be overwritten in the PHP. ini fileDisplay_errorsThe configured flag andError_reporting. Value2039RepresentativeE_all &~ E_notice. If you want to useE_all, Set the value2047. Similarly, restart Apache.