CodeIgniter Forums
Session data disappearing on redirect - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Session data disappearing on redirect (/thread-43378.html)

Pages: 1 2


Session data disappearing on redirect - El Forum - 07-13-2011

[eluser]pornnarnold[/eluser]
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.


Session data disappearing on redirect - El Forum - 07-14-2011

[eluser]LuCiAn0[/eluser]
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.


Session data disappearing on redirect - El Forum - 07-14-2011

[eluser]Vheissu[/eluser]
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).


Session data disappearing on redirect - El Forum - 07-15-2011

[eluser]pornnarnold[/eluser]
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.


Session data disappearing on redirect - El Forum - 07-15-2011

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


Session data disappearing on redirect - El Forum - 07-16-2011

[eluser]Aken[/eluser]
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.


Session data disappearing on redirect - El Forum - 07-16-2011

[eluser]pornnarnold[/eluser]
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.


Session data disappearing on redirect - El Forum - 07-16-2011

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

InsiteFX


Session data disappearing on redirect - El Forum - 08-03-2011

[eluser]Unknown[/eluser]
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 :-)