Home > Article > Backend Development > How to enable the error log of php-fpm?
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.
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
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
3. Restart php-fpm
systemctl restart php-fpm
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!