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
opcache: Disallow changing opcache.memory_consumption when SHM is set up
Normally changing the INI value is not possible after SHM is set up, since it
is `PHP_INI_SYSTEM`. FPM is a notable exception: SHM is set up in the master
process, but when spawning the individual pools, the `php_admin_value` config
option can be used to change `PHP_INI_SYSTEM` INIs on a per-pool basis. This
does not work for this option, since it will only be read on early start,
leading to misleading PHPInfo output, since the INI value appears to be
successfully set and since some of the calculated values are derived from the
INI value rather than the actual value.
Copy file name to clipboardExpand all lines: ext/opcache/zend_accelerator_module.c
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -76,6 +76,15 @@ static int validate_api_restriction(void)
76
76
77
77
staticZEND_INI_MH(OnUpdateMemoryConsumption)
78
78
{
79
+
if (accel_startup_ok) {
80
+
if (strcmp(sapi_module.name, "fpm-fcgi") ==0) {
81
+
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");
82
+
} else {
83
+
zend_accel_error(ACCEL_LOG_WARNING, "opcache.memory_consumption cannot be changed when OPcache is already set up.\n");
0 commit comments