Repository navigation
fix(php): drop deprecated session ID ini settings from 8.4 and 8.5 - #372
Merged
mrrobot47 merged 1 commit intoNov 4, 2026
Merged
Conversation
session.sid_length and session.sid_bits_per_character are deprecated as of PHP 8.4: setting either one raises an E_DEPRECATED at startup, which shows up in php -i, php-fpm -t and the FPM log whenever error_reporting includes E_DEPRECATED. PHP's own php.ini-production for 8.4 and later no longer sets them. Remove both directives and their quick-reference entries from the 8.4 and 8.5 php.ini, matching upstream. Newly created session IDs fall back to PHP's defaults, 32 characters of 0-9a-f (128 bits) instead of 26 characters of 0-9a-v (130 bits). IDs issued before the change are still accepted. The 5.6 to 8.3 and stable images keep the settings, since they are valid there and changing them would only alter session IDs without removing a deprecation.
There was a problem hiding this comment.
🟢 Approval recommended
Both files consistently remove only the deprecated settings and associated comments, with no unresolved issues identified.
No open issues 🎉
What changed in this PR
Removes deprecated session ID settings from the PHP 8.4 and 8.5 image configurations, avoiding startup deprecations and restoring PHP’s default session ID generation.
Changes:
- Removes
session.sid_lengthandsession.sid_bits_per_character, allowing new IDs to use 32 hexadecimal characters. - Removes the associated comments and quick-reference entries; older PHP configurations remain unchanged.
| File | Description |
|---|---|
php/8.5/php.ini |
Removes deprecated session ID directives and associated comments. |
php/8.4/php.ini |
Applies the same cleanup to the PHP 8.4 configuration. |
Review effort: Balanced
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.
What
Remove
session.sid_lengthandsession.sid_bits_per_character(and their quick-reference entries) fromphp/8.4/php.iniandphp/8.5/php.ini. This matches PHP's ownphp.ini-productionfor 8.4 and later, which no longer sets either directive.Why
Both settings are deprecated as of PHP 8.4. Setting either one raises an
E_DEPRECATEDduring startup:With the shipped
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT) these are hidden, but they appear inphp -i,php-fpm -tand the FPM log as soon as a site raiseserror_reportingto includeE_DEPRECATEDat the ini level, and the settings are slated for removal in a future PHP version.Behaviour change
Only session ID generation on 8.4 and 8.5 changes. New IDs fall back to PHP's defaults:
session.sid_lengthsession.sid_bits_per_character0-9a-v)0-9a-f, default)IDs issued before the change are still accepted (checked with an existing 26-character
0-9a-vsession, withsession.use_strict_modeboth off and on), so logged-in users are not signed out. Apart from these two keys, the effective ini (ini_get_all()) and the loaded modules are identical before and after.The 5.6 to 8.3 and
stable(7.4) images keep the settings: they are valid there, raise no deprecation, and removing them would only change session IDs.This only affects newly created sites: the PHP config of an existing site lives in its own volume, which is populated from the image once, at creation.
Testing
Built
php/8.4andphp/8.5from this branch and compared each against the publishedeasyengine/php8.4:v4.13.3/easyengine/php8.5:v4.13.3(same Dockerfiles, so php.ini is the only difference):php-fpm -tandphp -iwitherror_reporting=-1 display_startup_errors=1print both deprecations; a new session ID is 26 characters of0-9a-vsession.sid_length => 32,session.sid_bits_per_character => 4; a new session ID is 32 hex charactersini_get_all()differs only in the two keys;php -mis identicalIndependent of #367: this touches only the two php.ini files and merges cleanly with it.