File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,15 +176,21 @@ replace the `.` in the settings by `__`. Examples:
176176Upper case allowed (will be lower-cased):
177177```
178178PHPINI__SESSION__SAVE_HANDLER=redis
179+ PHPINI__SESSION__SAVE_PATH='"tcp://redis:6379?persistent=1&weight=1&database=10&prefix=PHPSESSID:"'
179180PHPINI__REDIS__SESSION__LOCKING_ENABLED=1
180181```
181182
182- Or:
183+ Or (lower case also fine) :
183184```
184185PHPFPM__request_terminate_timeout=30s
185186PHPFPM__pm__max_children=15
186187```
187188
189+ ** Note** : make sure that potentially required double quotes ` " ` are part of the
190+ "string" that ends up in the ENV variable, so quote as necessary, because this
191+ string is copied "as is" to the ini files. See example above for the
192+ ` PHPINI__SESSION__SAVE_PATH ` - this would be the syntax for a ` .env ` file.
193+
188194## Example usage
189195
190196Copy the files from ` example-app/ ` folder to your application, tweak, and you are
Original file line number Diff line number Diff line change @@ -47,10 +47,11 @@ pm.max_children = 5
4747# PHP settings by env vars
4848# -----------------------------------------
4949
50- # Example of setting php.ini settings
50+ # Example of setting php.ini settings, UPPER CASED
5151PHPINI__SESSION__SAVE_HANDLER = redis
52+ PHPINI__SESSION__SAVE_PATH = ' "tcp://redis:6379?persistent=1&weight=1&database=10&prefix=PHPSESSID:"'
5253PHPINI__REDIS__SESSION__LOCKING_ENABLED = 1
5354
54- # Example of setting PHP-FPM settings
55- PHPFPM__REQUEST_terminate_timeout = 30s
55+ # Example of setting PHP-FPM settings, lower cased also possible
56+ PHPFPM__request_terminate_timeout = 30s
5657PHPFPM__pm__max_children = 15
Original file line number Diff line number Diff line change @@ -103,10 +103,9 @@ if env | grep -q '^PHPINI__'; then
103103 # Transform key: PHPINI__this__setting => this.setting
104104 key=${name# PHPINI__}
105105 key=$( printf ' %s' " $key " | sed ' s/__/./g' )
106- # Lowercase in POSIX sh (dash/busybox) without bash-specific substitution
107106 key=$( printf ' %s' " $key " | tr ' [:upper:]' ' [:lower:]' )
108107 # Append as "key = value" (value is written as-is; quote in ENV if needed)
109- printf ' * setting in php.ini: %s = %s\n' " $key " " $value "
108+ printf ' * Setting in php.ini: %s = %s\n' " $key " " $value "
110109 printf ' %s = %s\n' " $key " " $value " >> " $CUSTOM_INI "
111110 # Unset them, not relevant to the running containers
112111 unset " $name "
You can’t perform that action at this time.
0 commit comments