-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Description
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