You can also set error_log = syslog, so that These error messages are logged in the operating system log. display_errors = Off //display in Chinese means display, so display_error=off means not displaying errors! error_reporting sets the level of error message reporting 2047 I remember it should be E_ALL. There are many configuration settings in the php.ini file. You should have set up your php.ini file and placed it in the appropriate directory, as documented in the instructions for installing PHP and Apache 2 on Linux (see Resources). There are two configuration variables that you should be aware of when debugging PHP applications. Here are the two variables and their default values: display_errors = Off //Turn off all error messages. When it is ON, all error messages are displayed. error_reporting = E_ALL E_ALL covers everything from bad coding practices to harmless tips to errors. E_ALL is a bit too fine-grained for development, as it also displays hints on the screen for small things (such as variables not being initialized), which messes up the browser's output. Therefore, it is not recommended to use 2047. It is best to change the default value to: error_reporting = E_ALL & ~E_NOTICE Solution to the failure of display_errors = Off in PHP.ini Question: The PHP setting file php.ini has clearly set display_errors = Off, but during operation, error messages still appear on the web page. solve: After checking log_errors=On, according to the official statement, when this log_errors is set to On, the error_log file must be specified. If it is not specified or the specified file does not have permission to write, it will still be output to the normal output channel, which makes The specified Off of display_errors is invalid, and the error message is still printed. So set log_errors = Off and the problem is solved. It is often seen that error_reporting (7) means: setting the level of error message reporting. value constant 1E_ERROR 2 E_WARNING 4E_PARSE 8 E_NOTICE 16 E_CORE_ERROR 32 E_CORE_WARNING 64 E_COMPILE_ERROR 128 E_COMPILE_WARNING 256 E_USER_ERROR 512 E_USER_WARNING 1024 E_USER_NOTICE 2047 E_ALL 2048 E_STRICT However 7=1+2+4 When an error occurs, 1 E_ERROR 2 E_WARNING 4 E_PARSE is displayed.
|