Repository navigation
Conversation
We only need to test this in cli, but this is a problem in ALL sapis that allow opcache optimizations. Issue: phpGH-8699
When using opcache with optimization return value from ini_get() for PHP_INI_SYSTEM type directives was cached per file. This is a problem for shared files that use ini_get(). This is a real problem for virtual hosts (both apache and fpm) because using php_admin_(value|flag) sets any value as PHP_INI_SYSTEM, and this really is the only way to set specific values per virtual host. Like changing the upload directory. Fixes phpGH-8699
|
I think it makes sense from the FPM PoV not to do this optimization because it can be changed using PHP_ADMIN_VALUE. @dstogov are you fine with this change? |
dstogov
left a comment
There was a problem hiding this comment.
I'm not sure if this is a bug and if it should be fixed.
By design, ZEND_INI_SYSTEM setting are set once during PHP startup and cannot be changed. Settings that may be changed per-request should be ZEND_INI_PERDIR. FPM ignores this, but this doesn't mean overriding of all ZEND_INI_SYSTEM will work.
|
@dstogov You are right in principle. However |
|
That said I would agree that it's not exactly a bug and I'd rather not change in the patch release. This slightly protects people that expose FPM to public network as we had bunch of reports about allowing anyone to set |
|
The proper solution would be adding |
|
Ok I think introducing new |
|
Closing this, as we settled on a different solution that doesn't require we drop the optimization. Assigning to you @bukka for the sake of your own book-keeping, and in-case you ever get around to |
This fixes #8699 for PHP-8.1.
Can also be used for 8.0 and 7.4.
For 8.2, the problematic code has been moved to zend_optimizer.c.