Skip to content

opcache: Disallow changing opcache.memory_consumption when SHM is set up #19146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TimWolla
Copy link
Member

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.

TimWolla added 2 commits July 16, 2025 10:28
This is necessary for phpdbg, which runs multiple startup/shutdown cycles in
the same process.
…et 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.
@TimWolla TimWolla force-pushed the opcache-memory-after-shm-setup branch from d7dbe47 to 3265c7c Compare July 16, 2025 08:28
@TimWolla TimWolla requested a review from arnaud-lb July 16, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant