PHP-FPM doesn't write to error log
There are a few things you can try to troubleshoot this issue:
Check the permissions of the error log file to make sure that the PHP-FPM process has write permissions.
Check the PHP-FPM configuration file (usually
php-fpm.conf
orwww.conf
) to make sure that the error log file is correctly configured. It should have a line similar toerror_log = /path/to/error.log
.Check the PHP error log configuration in the PHP INI file (usually
php.ini
). Make sure that theerror_log
directive is set to the correct path and that the log file is writable by the PHP-FPM process.Restart the PHP-FPM service to apply any changes you have made.
Check the system logs (e.g.
/var/log/syslog
on Ubuntu) to see if there are any messages related to the PHP-FPM process or the error log file.If none of these steps help, you can try increasing the PHP-FPM logging level to see if it provides any additional information about the issue. You can do this by adding the following line to the PHP-FPM configuration file:
log_level = debug
.
I hope this helps! Let me know if you have any other questions.