[php-src] master: Merge branch 'PHP-8.6'
| From: | ndossche | Date: | Fri, 30 Oct 2026 09:54:16 +0000 |
| Subject: | [php-src] master: Merge branch 'PHP-8.6' | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-142992@lists.php.net to get a copy of this message | ||
Author: ndossche (ndossche)
Date: 2026-10-30T10:54:06+01:00
Commit: https://github.com/php/php-src/commit/e512f6efda4d9311bae2f3476d7d21fadc17254c
Raw diff: https://github.com/php/php-src/commit/e512f6efda4d9311bae2f3476d7d21fadc17254c.diff
Merge branch 'PHP-8.6'
* PHP-8.6:
Fix opcache.interned_strings_buffer being 0 in threads started later (ZTS)
Changed paths:
M ext/opcache/zend_accelerator_module.c
Diff:
diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c
index a513627414ac..aa8826e69f16 100644
--- a/ext/opcache/zend_accelerator_module.c
+++ b/ext/opcache/zend_accelerator_module.c
@@ -102,7 +102,12 @@ static ZEND_INI_MH(OnUpdateMemoryConsumption)
static ZEND_INI_MH(OnUpdateInternedStringsBuffer)
{
- if (accel_startup_ok) {
+ /* Under ZTS, every thread started later re-applies the INI entries at
+ * ZEND_INI_STAGE_STARTUP to fill its own globals. Accepting that is safe: the
+ * value comes from the global INI directives, so it is the one OPcache was
+ * set up with. NTS does not have this problem: STARTUP handlers run before
+ * accel_startup_ok is set, and accel_shutdown() clears it again. */
+ if (accel_startup_ok && stage != ZEND_INI_STAGE_STARTUP) {
if (strcmp(sapi_module.name, "fpm-fcgi") == 0) {
zend_accel_error(ACCEL_LOG_WARNING, "opcache.interned_strings_buffer cannot be changed when
OPcache is already set up. Are you using php_admin_value[opcache.interned_strings_buffer] in an
individual pool's configuration?\n");
} else {