Bytes --------------------------------------------------------------------------------------------------
PHP program errors include syntax errors, runtime errors, and logic errors.
If the PHP script does not report a syntax error, why:
------------------------ @ Author chenwei <www. chenwei. ws> ---------------------------
1. In a general integrated environment, error reports are enabled by default. However, in a linux system, installation using a software package is not required,
Now you can view the PHP configuration file and open the error report =>
Display_errors = On/* PHP configuration file path:/uer/local/php/etc/php. ini */
Note: How to dynamically set the PHP. ini configuration file in the php script =>
Ini_set ('display _ errors ', 'on');/* display all errors */
2. Set the error report level =>
Error_reporting = E_ALL;/* the strictest Error Reporting level, which can be enabled during development */
Error_reporting = E_ALL &~ E_NOTICE/* errors other than notice */
Error_reporting = E_ERROR | E_PARSE | e_CORE_ERROR/* only critical runtime errors, new parsing errors, and core errors are considered */
The above three types are recommended.
Note: How to dynamically set the error report level of error_reporting in the PHP script =>
Error_reporting (E_ALL &~ E_NOTICE );
3. After changing the configuration file, restart the service to take effect =>
Apache startup:/usr/local/apache2/bin/apachectl start/* Recommended */
In addition, the Red Hat Linux private startup command: service httpd start
Restart Apache:/usr/local/apache2/bin/apachectl restart
In addition, the Red Hat exclusive startup command: service httpd restart
Stop Apache:/usr/local/apache2/bin/apachectl stop
In addition, the Red Hat exclusive startup command: service httpd stop
Restart Nginx:/usr/local/nginx/sbin/nginx-s reload/* smooth restart */
Bytes -------------------------------------------------------------------------------------------------