Comments (5)
How are you using this docker container. It could be possible that the webserver use php config directives that cannot be overwritten: See this for details:
https://ma.ttias.be/php-php_value-vs-php_admin_value-and-the-use-of-php_flag-explained/
Can you show me your webserver config?
from docker-php-fpm-5.4.
Thanks for the quick reply! I don’t think this is the reason - there are no php_value/php_flag
instances in the entire repo. Here is the Dockerfile for Apache:
FROM httpd:latest
RUN echo "Include conf/site.conf" >> /usr/local/apache2/conf/httpd.conf
RUN sed -i 's/^#LoadModule proxy_http_module /LoadModule proxy_http_module /g' /usr/local/apache2/conf/httpd.conf
RUN sed -i 's/^#LoadModule proxy_module /LoadModule proxy_module /g' /usr/local/apache2/conf/httpd.conf
RUN sed -i 's/^#LoadModule proxy_fcgi_module /LoadModule proxy_fcgi_module /g' /usr/local/apache2/conf/httpd.conf
RUN sed -i 's/^#LoadModule rewrite_module /LoadModule rewrite_module /g' /usr/local/apache2/conf/httpd.conf
The vhost config is very standard, it just forwards requests for .php files to the PHP-FPM container:
<FilesMatch \.php$>
SetHandler "proxy:fcgi://php:9000"
</FilesMatch>
The PHP-FPM container config (using docker-compose) is also pretty standard, it mostly just mounts some files/folders:
php:
build:
context: ./support/docker/php
dockerfile: Dockerfile
volumes:
- ./:/srv/www/html/current
- ./support/srv-data:/srv/www/data
- ./support/docker/php/ini:/etc/php-custom.d
- ./support/docker/php/php-fpm.conf:/usr/local/etc/php-fpm.conf
links:
- mysql
So I’m really not sure why this won’t work. phpinfo()
specifically lists the override file in the "Additional .ini files parsed" section.
Can you confirm that you are able to actually override something using a custom php.ini, not just in theory?
from docker-php-fpm-5.4.
Hmm, some additional info. It actually does work for some other settings. I tried setting some random setting from the output of phpinfo()
, specifically upload_tmp_dir
, and that worked!
So for some reason error_reporting
and display_errors
don’t work, but others do. Color me confused...
from docker-php-fpm-5.4.
Figured it out.
The two ini-settings I was struggling with are overridden in php-fpm.conf
, so I had to override them again from my PHP-FPM config override:
In the PHP-FPM part of docker-compose.yml:
- ./support/docker/php/php-fpm.conf:/etc/php-fpm.d/local.conf
And in ./support/docker/php/php-fpm.conf:
[www]
php_value[error_reporting] = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR
php_flag[display_errors] = Off
from docker-php-fpm-5.4.
👍 good catch. Enjoy your setup
from docker-php-fpm-5.4.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-php-fpm-5.4.