MartinW12 Posted August 2, 2020 Share Posted August 2, 2020 I have a very simple docker installation consisting of NGINX and PHP via FastCGI on port 9000. I have configured my Dockerfile so that the PHP container copies “php.ini-production” to “php.ini” and then I copy in my own “php_settings.ini” into “conf.d”. Currently the only settings I have in “php_settings.ini” are “fastcgi.logging = 0” and “display_errors = on” (this last one is just to confirm the file is being loaded). Now, if my script has an error then the error is displayed as expected because “display_errors = on”. However I am finding that “fastcgi.logging = 0” is not stopping PHP from logging all requests that are made, which is completely useless and unwanted and just clogs up the docker logs. Note that if the PHP script runs phpinfo() it does show that “fastcgi.logging = 0” has been set. But it does not appear to turn off SAPI logging which is what I want. Certainly, the docker logs contains one line for each request looking something like: Quote 172.18.0.3 - 01/Aug/2020:12:56:25 +0000 “GET /index.php” 200 Does anyone have any suggestion as to how this SAPI logging can be turned off? Thanks … For completeness, here is my Dockerfile for PHP: FROM php:7.4-fpm RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" COPY application/php.ini "$PHP_INI_DIR/conf.d/php_settings.ini" COPY src /var/www/html EXPOSE 9000 CMD ["php-fpm"] Quote Link to comment https://forums.phpfreaks.com/topic/311263-php-cannot-set-fastcgilogging-to-0/ Share on other sites More sharing options...
requinix Posted August 2, 2020 Share Posted August 2, 2020 FastCGI and php-fpm are not the same thing. If you don't want php-fpm to log then configure php-fpm to not log. Quote Link to comment https://forums.phpfreaks.com/topic/311263-php-cannot-set-fastcgilogging-to-0/#findComment-1580275 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.