PHP-FPM doesn't write to error log

There are a few things you can try to troubleshoot this issue:

  1. Check the permissions of the error log file to make sure that the PHP-FPM process has write permissions.

  2. Check the PHP-FPM configuration file (usually php-fpm.conf or www.conf) to make sure that the error log file is correctly configured. It should have a line similar to error_log = /path/to/error.log.

  3. Check the PHP error log configuration in the PHP INI file (usually php.ini). Make sure that the error_log directive is set to the correct path and that the log file is writable by the PHP-FPM process.

  4. Restart the PHP-FPM service to apply any changes you have made.

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

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