Codeigniter session issue |
[eluser]Nikita[/eluser]
Hi, When a user is logged in, the session is created using the session helper / class in codeigniter. However, if i hit refresh or just browsing the site after awhile, i just get logged out? anyone know why this happens? Code: $config['sess_cookie_name'] = 'ci_session';
[eluser]InsiteFX[/eluser]
1) Check and make sure you are using the correct ci_session table. 2) Check your server's time. 3) Raise the sess_time_to_update. 4) try turning off sess_match_useragent.
[eluser]Reneesh T K[/eluser]
http://myphplibrary.blogspot.in/2012/03/...ation.html I have a codeigniter site with a shopping cart and it is using database to store session values. But the session is going out when I add hundreds of products in it. I have spent two days checking about it and finally find out the issue in it. It was failing to unserialize the session data stored in the ci_sessions table in the field 'user_data'. After checking sometime I found that the field(user_data) is failing to store all serialized data in it. So when unserializing it is failing. So I have changed the field type of 'user_data' from 'text' to 'longtext' and now it is able to store more data and my problem fixed. Now the session is not breaking.
[eluser]InsiteFX[/eluser]
Thats because you went over the text limit so mysql just truncated it! I do not think that you need the longtext, change it to mediumtext. Code: -- ------------------------------------------------------------------------ |
Welcome Guest, Not a member yet? Register Sign In |