When debugging a PHP application, you should know two configuration variables. The following are the two variables and their default values: Display_errors = Off error_reporting = E_all Open the PHP error report method for your reference. There are many configuration settings in the php.ini file. You should have your own php.ini file set up and put it in the appropriate directory, as shown in the documentation for installing 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: Display_errors = Off error_reporting = E_all By searching for them in the php.ini file, you can find the current default values for both 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, please set this value to On:display_errors = On The default value for the error_reporting variable is e_all. This setting shows all the information from bad coding practices to harmless prompts to errors. E_all is a bit too thin for the development process because it shows hints on the screen for small things (such as uninitialized variables), which 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 default value of error_reporting with the following values: error_reporting = e_all & ~e_notice Reboot Apache, configuration complete. |