Welcome Guest, Not a member yet? Register   Sign In
Sessions disappearing?
#1

[eluser]@li[/eluser]
Hi, I'm using the CodeIgniter session library, storing the sessions to the database.

I have a strange problem, whenever I set a session and redirect a user, using:

Code:
$this->session->set_userdata('foo', 'bar');

I'm able to access this variable just fine the first time around, but if I do a page refresh this session value is gone.. what's the reason behind this?

Edit: It seems that in config.php, changing this:


Code:
$config['sess_expiration']        = 7200;
to this:

Code:
$config['sess_expiration']        = 0;

fixes this issue, even though if the variable is set to 7200, that should mean that the session would be active for 7200 seconds (i.e 2 hours) while it actually disappears with each page load.


Messages In This Thread
Sessions disappearing? - by El Forum - 04-12-2011, 10:01 AM
Sessions disappearing? - by El Forum - 04-12-2011, 10:39 AM
Sessions disappearing? - by El Forum - 04-12-2011, 06:26 PM
Sessions disappearing? - by El Forum - 04-13-2011, 03:00 AM
Sessions disappearing? - by El Forum - 05-10-2011, 07:58 AM
Sessions disappearing? - by El Forum - 05-10-2011, 09:03 AM
Sessions disappearing? - by El Forum - 05-10-2011, 01:01 PM
Sessions disappearing? - by El Forum - 05-10-2011, 01:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB