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

How to enable error log in php fpm

coldplay.xixi
Release: 2023-03-05 12:08:01
Original
2841 people have browsed it

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
Copy after login

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
Copy after login

3. Restart php-fpm

systemctl restart php-fpm
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template