The PHP script does not report errors for two reasons. There are generally three types of PHP program errors: syntax errors, runtime errors, and logic errors. 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 ---------------------------
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 -------------------------------------------------------------------------------------------------
There are three common errors in http://www.bkjia.com/PHPjc/781922.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/781922.htmlTechArticle runtime PHP: syntax errors, runtime errors, and logic errors ....