Skip to content

Instantly share code, notes, and snippets.

@Calinou
Created December 2, 2020 23:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Calinou/41624fe005e9d6e02c083ed3261ccae0 to your computer and use it in GitHub Desktop.
Save Calinou/41624fe005e9d6e02c083ed3261ccae0 to your computer and use it in GitHub Desktop.
Enable error reporting in php-fpm (copied from https://github.com/rlerdorf/php7dev/issues/48#issuecomment-174212265)

I was able to activate it, if anyone needs, just follow these steps:

1: edit:

sudo vim /usr/local/etc/php-fpm.d/www.conf

2: add to the end of the file:

catch_workers_output = yes

php_flag[display_errors] = on
php_admin_value[error_log] = /var/log/fpm-php.www.log
php_admin_flag[log_errors] = on

3: create the log file, so php-fpm can write on it:

touch /var/log/fpm-php.www.log && chmod 666 /var/log/fpm-php.www.log

and then you can see all errors/warnings/etc using:

tail -f /var/log/fpm-php.www.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment