You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FixedGH-22216: don't warn in OnUpdateMemoryConsumption on ZTS thread init
The ZTS per-thread ini refresh runs on_modify at ZEND_INI_STAGE_STARTUP to
populate the new thread's globals; skip the accel_startup_ok guard there so
it is not treated as a post-startup change.
Copy file name to clipboardExpand all lines: ext/opcache/zend_accelerator_module.c
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,9 @@ static int validate_api_restriction(void)
79
79
80
80
staticZEND_INI_MH(OnUpdateMemoryConsumption)
81
81
{
82
-
if (accel_startup_ok) {
82
+
/* On ZTS, each new thread runs the on_modify handlers at STAGE_STARTUP to
83
+
* populate its own globals; that is thread init, not a post-startup change. */
84
+
if (accel_startup_ok&&stage!=ZEND_INI_STAGE_STARTUP) {
83
85
if (strcmp(sapi_module.name, "fpm-fcgi") ==0) {
84
86
zend_accel_error(ACCEL_LOG_WARNING, "opcache.memory_consumption cannot be changed when OPcache is already set up. Are you using php_admin_value[opcache.memory_consumption] in an individual pool's configuration?\n");
0 commit comments