-
Notifications
You must be signed in to change notification settings - Fork 660
[5.x]: session_start(): Unexpected end of serialized data #16859
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
Comments
Update: Solved this by switching to Redis for session storage. Feel free to close if you think it's not something that's likely to affect others. |
Nothing changed in Craft 5 related to PHP session data. It sounds like maybe some session data got corrupted somehow? |
Could be, but I wouldn't know how to find out! Can I delete all session data? |
Yeah, PHP stores it whenever the |
Hi, I found time to do some more testing and:
The template triggers the error, so it seems there is a Craft bug? Note: Any similar template does not trigger errors in other projects, so I assume there must be something in the project config of this particular project, since we elminated the DB. Would you like me to send the composer and project config files to check? |
Yes please, as well as any custom plugins/modules the project is using. |
I just sent the files, thanks! |
What happened?
Description
I have a project that I'm trying to upgrade from Craft 4 to Craft 5. In some of my templates I use both
craft.app.session
and the cookies plugin. I'm also fetching data from an external DB following this article. In those templates, I get the following error:Notes:
ctrl+F5
it seems to work for some time... until it doesn't.devMode
is disabled the error is hidden and the page loads just fine.This is probably my fault because I'm doing some weird things in my templates, so — for now — don't lose too much time looking into this, I'd just like a nudge in the right direction. Do you have any obvious pointers based on the above?
I 'll come back to you with more details to help you reproduce if I'm unable to solve by myself, or I'm more confident it's a Craft bug.
Craft CMS version
5.6.11
PHP version
8.2
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: