ini_set() doesn't seem to work with php-fpm
Issue description
As the title, ini_set() doesn't seem to work with php-fpm. I tried confirming it with the following images:
- serversideup/php:7.3-fpm-apache
- serversideup/php:7.4-fpm-apache
- serversideup/php:8.0-fpm-apache
- serversideup/php:8.1-fpm-apache
Environment
- Opertaing System Version: macOS 12
- Docker Version: Docker version 20.10.12, build e91ed57
Steps to reproduce the issue
- Create a index.php
- Use below code:
<?php
echo ini_get('display_errors');
if (ini_get('display_errors')) {
ini_set('display_errors', '0');
} else {
ini_set('display_errors', '1');
}
echo ini_get('display_errors');
- ini_set returns false, display_errors value unchanged.
What is expected?
Value of display_errors will change.
Additional details / screenshots
I have not changed any settings from your Docker images.
Update:
I was able to temporarily fix it by replacing php_admin_* settings.
I added this line to my Dockerfile.
RUN grep -rl '^php_admin_' /etc/php/ | xargs -I {} sed -i 's/^php_admin_/php_/g' {}
Thanks for your report! I will take a look into this soon.
@jaydrogers
I appreciate you giving these projects away for free (and hope it stays free for future maintenance). I'm also digging into the components of your projects, to make sure they are transparent, secure and performant enough for the projects I'm working on.
Thanks!! We love contributing to open source and our goal is to continue to make it free.
We just launched a sponsorship program for those interested (https://github.com/sponsors/serversideup), but no pressure on signing up. We haven't really promoted it yet.
We're hoping to gain a lot of momentum where we can and build up a solid financial base where we can release even more open source projects. Lots of things in the works! 🚀