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.
docker/base/config_files/php. ini.
ini file is the default configuration file for running applications that require PHP. It is used to control variables such as upload sizes, file timeouts, and resource limits. This file is located on your server in the /public_html folder.
The storage location of Docker images and containersUbuntu: /var/lib/docker/ Fedora: /var/lib/docker/ Debian: /var/lib/docker/ Windows: C:\ProgramData\DockerDesktop.
A little late to the party but since question is still relevant today, let me add a short answer:
Official php:7 images get their settings from /usr/local/etc/php
folder.
# First log into the running container
$ docker exec -it «container_name» /bin/bash
# List folder content
$ ls /usr/local/etc/php
# Which outputs following line
conf.d php.ini-development php.ini-production
If needed, modifying settings via conf.d folder seems better alternative, since xdebug uses it. For example, you can change upload size by adding uploads.ini
to conf.d
folder with the following content:
file_uploads = On
memory_limit = 64M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 600
Complete list of ini directives can be found at https://www.php.net/manual/en/ini.core.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With