-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
String too long #52
Comments
I haven't encountered this issue but it looks like something related to a db difference rather than it being related to PHP version difference. Here it says that this happens when MySQL is in If the data you have is really large you can change the Also, if you have to store so much data in the session a better solution would be to use |
great answer |
In my previous comment I forgot to mention that although data is indeed written to the db, it is truncated to fit the allowed size. I updated my previous comment |
Great response. Very helpful. Your instinct about the use of strict mode was spot on. It is possible that the amount of session data grew directly as a result of changing PHP versions, but it is more likely that the use of session data grew as the code features/functionality continued to expand after the change, Combined with the strict mode defaults for PHP 8, the error resulted. The net result is that changing the |
I just started getting this error (after upgrading to PHP 8.3.3):
Uncaught PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'session_data' at row 1 in C:\Apache24\htdocs\bluedots2\vendor\stefangabos\zebra_session\Zebra_Session.php:775
Zebra was working great for me in 7.4 and the same code that generated the error above, bid not generate an error when I was running PHP 7.4.
The database column definitions have not changed on my system.
What can be done to fix this?
The text was updated successfully, but these errors were encountered: