Skip to content

Conversation

@baschny
Copy link
Member

@baschny baschny commented Oct 28, 2025

The PHPINI__... and PHPFPM__... allow to set individual settings for php.ini and php-fpm.conf (pool settings) using individual environment variables. Just replace the . in the settings by __. Examples:

Upper case allowed (will be lower-cased):

PHPINI__SESSION__SAVE_HANDLER=redis
PHPINI__SESSION__SAVE_PATH='"tcp://redis:6379?persistent=1&weight=1&database=10&prefix=PHPSESSID:"'
PHPINI__REDIS__SESSION__LOCKING_ENABLED=1

Or:

PHPFPM__request_terminate_timeout=30s
PHPFPM__pm__max_children=15

Note: make sure the double quotes " are part of the "string" that ends up in the ENV variable, so quote as necessary, because this string is copied "as is" to the ini files). See example above for the PHPINI__SESSION__SAVE_PATH - this is the syntax for a .env file.

@baschny baschny changed the title Allow setting php.ini and php-fpm pool setting via individial env vars Allow setting php.ini and php-fpm pool setting via individual env vars Oct 28, 2025
@baschny
Copy link
Member Author

baschny commented Oct 29, 2025

@remuslazar ich merge das mal, dann kannst du das einfach mal nutzen und ausprobieren im anderen PR, ok? Bin zufrieden damit, falls was nicht in Ordnung ist, kann man das dann noch in einem fup lösen.

@baschny baschny merged commit 25394f6 into master Oct 29, 2025
8 checks passed
@baschny baschny deleted the ini-from-env-vars branch October 29, 2025 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants