From where is my php.ini being loaded in php Docker container?
Answer a question I am running this Docker instance of a linux debian:jessie with php 5.6. This is part of my phpinfo : As we can see the php.ini should be located at /usr/local/etc/php And this is wh
Answer a question
I am running this Docker instance of a linux debian:jessie with php 5.6.
This is part of my phpinfo :
As we can see the php.ini
should be located at
/usr/local/etc/php
And this is what I have inside /usr/local/etc/
But there is no php.ini inside it.
I the other hand, I have the php.ini inside
So, from where exactly is my php.ini being loaded?
We dont even have a php process running but the php seems to be ok - being displayed phpinfo in the screen.
Answers
Let try it as an answer:
It does not exist at all, which means php will run the default options.
Look at your docker file, it starts from a "clean" OS, installs Apache and PHP in it. But it never copies the php.ini file from the PHP installation into /usr/local/etc/php
. Actually in lines 31 and 32 it creates the conf.d directory but that is it.
So I would suggest, at the end of your docker file, add code to copy php.ini-production
to /usr/local/etc/php.ini
, and edits as required. Or use default options.
更多推荐
所有评论(0)