You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently switched my session driver from "file" to "database," and I encountered a frustrating issue where I was losing sessions soon after login. I spent three days troubleshooting the code, unable to pinpoint the problem.
After much investigation, I discovered that the session payload was larger than the allowable size of the text field in the sessions table in the database. Instead of throwing an SQL error, the framework silently saved an incomplete payload string, which rendered it useless.
I believe it would be beneficial for future developers to address this issue. It would be more helpful if Laravel could provide an SQL error when the session payload exceeds the maximum size for the database field, preventing the saving of incomplete session data.
I hope this feedback helps improve the framework for others.
Steps To Reproduce
add some more data in session a part from authentiaction that could not fit in sessions.payload
The text was updated successfully, but these errors were encountered:
As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.
If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.
Laravel Version
11
PHP Version
8.2.12
Database Driver & Version
No response
Description
I recently switched my session driver from "file" to "database," and I encountered a frustrating issue where I was losing sessions soon after login. I spent three days troubleshooting the code, unable to pinpoint the problem.
After much investigation, I discovered that the session payload was larger than the allowable size of the text field in the sessions table in the database. Instead of throwing an SQL error, the framework silently saved an incomplete payload string, which rendered it useless.
I believe it would be beneficial for future developers to address this issue. It would be more helpful if Laravel could provide an SQL error when the session payload exceeds the maximum size for the database field, preventing the saving of incomplete session data.
I hope this feedback helps improve the framework for others.
Steps To Reproduce
add some more data in session a part from authentiaction that could not fit in sessions.payload
The text was updated successfully, but these errors were encountered: