Welcome Guest, Not a member yet? Register   Sign In
Session data disappearing on redirect

I know why it's happening but I've also tried every possible setting for the sessions.
Encrypted, stored in the database, not stored in the database.. etc.

I use sessions on my application and never had any problem, it works just perfect. Have you guys tried on different browsers just to see if the behavior is the same? I read somewhere that IE has problems with underscore("_") on the cookie name.

Looks like this is a bug in Codeigniter 2.0.2. Using sessions in a custom library don't seem to work, but using in a controller, etc do (from my testing).

It actually doesn't work directly in my controllers either.
As I say though, this is specific to one server and the code works perfectly fine on another server of ours.

For some reason, I don't have this issue any more. Nothing on my server changed, it just went away.

I was having this problem also on my local host with 2.0.2. I solved it by storing the user agent string in the database up to 120 characters instead of whatever the default is (50 I think?). I don't know why CI uses the user agent string to help compare it, but it helped.

I tried that too, no difference.
I did notice that particular 'bug' during my testing which was down to the fact that the user guide hadn't been updated.

If you do not need to check the user_agent set it to FALSE in application/config/config.php
and see if it works.
$config['sess_match_useragent']    = FALSE;


I have got some problem about session data too, My missing is I have set the 'Cookie Related Variables' poit to another domain (config.php around line 269-272) try to check it or use defalse value... hope this help :-)

Theme © iAndrew 2016 - Forum software by © MyBB