Forum Moderators: coopster
I was loosing my sessions from time to time, my users were just logged off for a reason I wasn't able to explain.
I'm using a custom session handler to save the session in MySQL. In fact I used this code:
[zend.com...]
Why I was loosing my sessions?
Because of the "ses_value text" field in the DB! My data sometimes exceeded 65535 bytes so the value saved in the DB was truncated! Therefore my sessions weren't loaded correctly after that.
I changed the field type to "mediumtext", which is way bigger, and now everything is fine!
More informations about types limits:
[dev.mysql.com...]
Hope it helps someone because it took me hours to figure out that bug!
tomda:
Look at the zend URL I gave in my message: there is a "Sample" section that will show you how to use the code. What you have to remember is that once the custom session handler is properly written, you can forget it and use the $_SESSION variable like you would do with the defaut session handler. Really easy.