1

Session is expired automatically in a short period after login and config setting for session in my framework is like this$config['sess_expiration']= 72000;. But it doesn't work and login session is expired before session time is expired.

  • Do you have ajax queries running on your application? If so, perhaps this is related http://stackoverflow.com/questions/7980193/codeigniter-session-bugging-out-with-ajax-calls – dakdad Sep 11 '13 at 06:11
  • I've had few issues with codeigniter session before. Are you running on localhost? Because it could happen due to timezone difference. And which session driver are you using? – JofryHS Sep 11 '13 at 06:12

1 Answers1

1

check your settings with these one

$config['sess_cookie_name']     = 'ci_session';
$config['sess_expiration']          = 7200;
$config['sess_expire_on_close'] = FALSE;
$config['sess_encrypt_cookie']      = TRUE;
$config['sess_use_database']        = FALSE;
$config['sess_table_name']          = 'ci_sessions';
$config['sess_match_ip']            = FALSE;
$config['sess_match_useragent'] = FALSE;
$config['sess_time_to_update']      = 300;
Deepanshu Goyal
  • 2,738
  • 3
  • 34
  • 61
  • When I change config session with above settings, it's ok but I need to store large amount of data in session table.That's why I need to use session table.So what should I do? – Aung Myint Myat Sep 11 '13 at 07:42
  • then you should set that to true, just dont change the following two and then check it $config['sess_match_ip'] = FALSE; $config['sess_match_useragent'] = FALSE; – Deepanshu Goyal Sep 11 '13 at 08:05