Home>Article>Backend Development> How to enable error log in php fpm

How to enable error log in php fpm

coldplay.xixi
coldplay.xixi Original
2020-08-28 15:48:16 2709browse

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].

How to enable error log in 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn