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
Fallback to php serialize handler in sessions when igbinary is used #13865
Conversation
hoping this fixes #13852
User confirmed it works in #13852 (comment) @diosmosis can you maybe have a look at the PR? I suppose it should be fine to merge. |
@@ -103,6 +103,10 @@ public static function start($options = false) | |||
// - user - we can't verify that user-defined session handler functions have already been set via session_set_save_handler() | |||
// - mm - this handler is not recommended, unsupported, not available for Windows, and has a potential concurrency issue | |||
|
|||
if (@ini_get('session.serialize_handler') === 'igbinary') { | |||
@ini_set('session.serialize_handler', 'php_serialize'); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we do this even when matomo isn't installed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We never had any complaints so seems to work finely for file sessions... but could do to be safe. Also wondering if we maybe should do
if (@ini_get('session.serialize_handler') !== 'php_serialize') {
@ini_set('session.serialize_handler', 'php_serialize');
}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me, not really sure what the benefit to a different serialize handler would be.
EDIT: reading the docs, doesn't look like there is one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed it 👍
hoping this fixes #13852