Cannot log with php-fpm

167 views
Skip to first unread message

John Ramsden

unread,
Feb 26, 2019, 6:58:31 PM2/26/19
to highloa...@googlegroups.com
I'm having trouble getting anything logged to my php-fpm error log. I've set logging on everywhere I can find. created my logfiles and set them www-data:www-data u=rw,g=rw,o=r, but I still get no errors.

I attached my php-fpm.conf, php.ini, and pool.d/www.conf , but the relevant parts:

pool.d/www.conf:

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


What am I missing?

--
John Ramsden
www.conf
php-fpm.conf
php.ini

John Ramsden

unread,
Feb 26, 2019, 10:39:39 PM2/26/19
to highloa...@googlegroups.com
I also tried logging to syslog:

php.ini:

error_log = syslog
In pool.d/www.conf comment out:

;php_admin_value[error_log]
It didn't display anything in the syslog after testing executing invalid code.

Apparently if error_log is commented out, it should default to sending logs to the nginx error log. That didn't work either.

Logging is definitely enabled and the log locations have been confirmed with:

print("\nlog_errors: ".ini_get('log_errors'));
print("\nerror_log: ".ini_get('error_log'));

--
John Ramsden
> --
>
> ---
> You received this message because you are subscribed to the Google
> Groups "highload-php-en" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to highload-php-...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> Attachments:
> * www.conf
> * php-fpm.conf
> * php.ini
Reply all
Reply to author
Forward
0 new messages