fpm logs
Closed this issue · 5 comments
Overview
Is there a way to watch fpm logs local?
docker logs showing only proxy logs at the moment.
We don't have an FPM image so that's likely why FPM logs aren't showing up.
Php must run with fpm for wp.
That's not true. You can see this just by looking at the official WordPress images on Dockerhub: https://hub.docker.com/_/wordpress/
solve it by those steps:
- adding logs.ini to root folder:
display_errors = on
track_errors = true
log_errors = on
- adding
- './logs.ini:/usr/local/etc/php/conf.d/'
into wordpress image volumes at docker-compose.yml - adding
error_reporting(E_ALL);
into wp-config.php or some other environmental configuration could help
and creating empty php-error.log on data folder (should be ignore on real live projects).
then php-fpm error logs will appear on this file.
See also:
The environment variables WP_DEBUG
, WP_DEBUG_DISPLAY
, and WP_DEBUG_LOG
listed in the README.
Setting WP_DEBUG_LOG
to /logs.ini
likely does what you're describing. But this is not PHP-FPM logs.
Additionally, if you add ini_set('error_reporting', E_ALL );
to EXTRA_PHP
, this will enable all errors to be reported (if not enabled already by wordpress).
It should also be mentioned that, unless you explicitly installed PHP-FPM yourself, PHP-FPM is not provided or supported by us in the image.