2

I'm using Alpine / Nginx / PHP-FPM 7.1.2.

I can't get PHP error's to display or output to the error.log in my Nginx server block. The access.log seems to work just fine.

I've got this at the bottom of www.conf in /usr/local/etc/php-fpm.d/

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

There is nothing in Docker logs and there are no errors in /var/log/fpm-php.www.log either...

What do I need to do display and log errors?

I've also tried the error log as: /proc/self/fd/2

Asa Carter
  • 239
  • 1
  • 3
  • 14

1 Answers1

1

I think it was because the error reporting level was not set in my Dockerfile:

RUN echo "php_admin_value[error_reporting] = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED">>/usr/local/etc/php-fpm.d/www.conf

This is producing error's on the screen and in the log.

Hopefully will help somebody..

Asa Carter
  • 239
  • 1
  • 3
  • 14