Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Add a check to make sure the session column can hold the data#14647
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…savedWe faced a problem in our app where the session data was being reset without any reason. We traced it down to the data being truncated when saving, so when it was read, being corrupt, it was reset.There was no error anywhere, so we thought this check would be nice to have.
keradus commentedMay 15, 2015
no need for new test that covers this new exception throw ? |
gonzalovilaseca commentedMay 15, 2015
You're right, will update PR with test |
Tobion commentedMay 15, 2015
This cannot be merged because |
Tobion commentedMay 15, 2015
https://dev.mysql.com/doc/refman/5.0/en/blob.html So for mysql enabling strict sql mode should be sufficient. |
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.
This notation does not work on PHP 5.3.
gonzalovilaseca commentedMay 18, 2015
@Tobion We store session in a Mysql in memory table therefore we cannot use blob or text, in our scenario the column can't be bigger than 21.000 chars. |
Tobion commentedMay 18, 2015
So do you use |
gonzalovilaseca commentedMay 18, 2015
@Tobion We are using varchar. Don't know exactly why, but it doesn't allow a value greater than 21k. Anyway we can solve the issue by writing fewer data to session, but the background problem still remains, allthough it seems that nobody has had it before. Should we just close thir PR? |
Tobion commentedMay 19, 2015
Closed in favor ofsymfony/symfony-docs#5269 as the only thing we can do is documentation |
We faced a problem in our app where the session data was being reset without any reason.
We traced it down to the data being truncated when saving, so when it was read, being corrupt, it was reset.
There was no error anywhere, so we thought this check would be nice to have.