How to enable the error log of php-fpm?

青灯夜游
Release: 2023-03-07 11:44:01
Original
3818 people have browsed it

How to enable php-fpm error log: 1. Configure php-fpm.conf, add "error_log=log/php_fpm.log" and "catch_workers_output=yes"; 2. Modify the configuration in php.ini; 3. Restart php-fpm.

How to enable the error log of php-fpm?

Recommended: "PHP Video Tutorial"

Enable php-fpm php error log Method

1. Modify the configuration in php-fpm.conf. If not, please add:

[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 it. :

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 executes an error, you can see the error log in "/usr/local/php/var/log/php_error_log"

For more programming-related knowledge, please visit: Programming Video! !

The above is the detailed content of How to enable the error log of 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!