Welcome Guest, Not a member yet? Register   Sign In
Session not updating sess_expiration
#1

[eluser]FernandoMM[/eluser]
Hello,

I´ m using DB_session ( http://codeigniter.com/wiki/DB_Session/ ) on my application as storing session values on cookies is totally insecure ( CI should change this as soon as possible ).

The problem is that it doesn´ t seen to be updating the duration of the cookie that it sets. My configuration is here:

Code:
$config['sess_cookie_name']        = 'asv';
$config['sess_expiration']        = 40;
$config['sess_encrypt_cookie']    = FALSE;
$config['sess_use_database']    = TRUE;
$config['sess_match_ip']        = FALSE;
$config['sess_match_useragent']    = TRUE;
$config['sess_time_to_update']         = 0;
$config['sess_table_name'] = 'sessions';

As you might see, i have set the sess_expiration to 40 seconds because my application ( using a ajax request ) request some information every 30 seconds.

I started to debug with Firebug to check where was the problem and found out that even with this request every 30 seconds the sess_expiration of the cookie wasn´ t updated. So the session is lost and user have to login again.

Anyone have ideas of what might be causing this?

Just a side note: i don´ t have to explicity call a function to update the cookie, right? As the library is on autoload.php it should already update itself.




Theme © iAndrew 2016 - Forum software by © MyBB