Allow php.ini changes for all variables#7
Merged
Chekote merged 5 commits intoChekote:masterfrom Jul 26, 2019
Merged
Conversation
…variables set to the container update readme file to reflect changes.
Chekote
requested changes
Jul 25, 2019
| # Set the uid that www-data will run as if one was specified | ||
| if [ "$WWW_DATA_USER_ID" != "" ]; then | ||
| usermod -u $WWW_DATA_USER_ID www-data | ||
| fi |
Owner
There was a problem hiding this comment.
Why did you remove the WWW_DATA_USER_ID and restore the deprecated PHP_FPM_USER_ID?
Contributor
Author
There was a problem hiding this comment.
my bad. I removed both while testing and forgot to add back.
entrypoint.sh
Outdated
| if [ "$PHP_FPM_USER_ID" != "" ]; then | ||
| (>&2 echo "Warning: PHP_FPM_USER_ID is deprecated. Please use WWW_DATA_USER_ID instead.") | ||
| WWW_DATA_USER_ID=$PHP_FPM_USER_ID | ||
| usermod -u $PHP_FPM_USER_ID nobody |
Owner
There was a problem hiding this comment.
Why did you change from modifying www-data to modifying nobody?
ab0159f to
9c22309
Compare
Contributor
Author
|
while re-reviewing it I modified it a bit more to be more optimized ( avoid repetition ). I have also updated the documentation a bit more. |
Owner
|
It's not working. I rebuilt the PHP 5 images and ran this: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue:
While using this php image in order to change php ini settings it isn't possible other than the currently 2 supported. This causes issues as php has many configurations which would be handy to change on different environments or be able to change with a simple command over them being set by modifying the php.ini script directly.
Solution:
This PR will solve this issue by allowing the use of prefixed environment variables
PHPto ensure that these are for changing php.ini variables only and then adding the extra prefixesCLIFPMandALLto allow these variables to be modified in CLI, FPM or both environments.In order to accomplish changes on variables that might have dots
.on them such assession.save_paththe variable name should have a double underscore__that will be replaced for a dot when parsing the file.