php fpm method to enable error log: first modify the configuration in [php-fpm.conf]; then modify the configuration in [php.ini]; finally restart [php-fpm], the code is [systemctl restart php-fpm].
【Related learning recommendations: php graphic tutorial】
How to enable error logs in php fpm:
1. Modify the configuration in php-fpm.conf. If not, please add:
The code is as follows:
[global] error_log = log/php_fpm.log [www] catch_workers_output = yes
2. Modify the configuration in php.ini, if not, add:
The code is as follows:
log_errors = On error_log = log/php_error_log error_reporting=E_ALL&~E_NOTICE error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT
3. Restart php-fpm
systemctl restart php-fpm
When PHP is executed When an error occurs, you can see the error log in "/usr/local/php/var/log/php_error_log"
Related learning recommendations: php programming (video)
The above is the detailed content of How to enable error log in php fpm. For more information, please follow other related articles on the PHP Chinese website!