Repository navigation
Skip loading opcache.so on PHP 8.5+ - #1701
Merged
Merged
Conversation
OPcache is built into PHP as of 8.5 and no longer ships as a shared extension, so `zend_extension=opcache.so` makes PHP-FPM log a "Failed loading Zend extension" warning on startup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OPcache is built into PHP as of 8.5 (RFC) and no longer ships as a shared
opcache.so. Sury'sphp8.5-commonandphp8.6-commonpackages don't include it. Only 8.4 and earlier shipphpX.Y-opcache.10-opcache.ini.j2always writeszend_extension=opcache.so, so withphp_version: "8.5"or later PHP-FPM logs this on every start:It isn't fatal: OPcache still loads and the
opcache.jit*settings still apply. This change writes thezend_extensionline only whenphp_versionis below 8.5.Testing
versiontest for 8.3, 8.4, 8.5, 8.6 and 8.10. The line is kept for 8.3 and 8.4 only.php:8.5-cli) with the old ini contents.🤖 Generated with Claude Code