Development, basically will display_errors,error_reporting open, help improve development efficiency, on-line, basically will turn off the page error information, in the error information, put in the file.
One, the error_log configuration of PHP-FPM
1, modify PHP.ini
Display_errors = off//To OFF, there is no error message when the page is accessed
2, modify the PHP-FPM configuration file
;p Hp_flag[display_errors] = off
Php_admin_value[error_log] =/var/log/php-fpm/www-error.log
Php_admin_flag[log_errors] = On
Restart PHP-FPM, where you should note that PHP-FPM configuration replaces the configuration in php.ini, Display_errors can also be configured in PHP-FPM. This will not appear on the page error information, error information is recorded in the file.
Second, command line error_log configuration, modify PHP.ini
Display_errors = Off
Log_errors = On
Error_log =/var/log/cron/error.log
To execute a command, such as:
[Root@network www]# PHP test.php//test.php syntax error
command line, is not called PHP-FPM configuration, so we can only modify the content of php.ini, modify, do not restart PHP. When the command is executed, the error message is written to the Error.log file, which is appropriate for the crontab PHP script.