title: PHP CodeIgniter Session ID not regenerating
body: <p>I'm having problems with the session ID not regenerating. This is my config</p>
  
  <pre><code>$config['sess_driver'] = 'database';
  $config['sess_cookie_name'] = 'ci_session';
  $config['sess_expiration'] = 60; // 15 minutes
  $config['sess_save_path'] = 'ci_sessions';
  $config['sess_match_ip'] = FALSE;
  $config['sess_time_to_update'] = 30; // 5 minutes
  $config['sess_regenerate_destroy'] = TRUE;
  </code></pre>
  
  <p>I set it to really short timeframes for experimentation. When I register a user, I set a session variable called user_id then load a different page. At registration the output for session variables is</p>
  
  <pre><code>[code]session_id() = kvrphe8... 
  timestamp (from ci_sessions) = 1523413499
  user_id = user87B...
  </code></pre>
  
  <p>If i wait exactly 40 seconds then query these same variables via ajax (without reloading the page), I get</p>
  
  <pre><code>session_id() = kvrphe8... 
  timestamp (from ci_sessions) = 1523413499
  user_id =user87B...
  </code></pre>
  
  <p>Why isn't the session id regenerating after 30 seconds? If i wait more than 60 seconds the session is destroyed as expected, and the session_id() changes. But shouldn't it change every 30 seconds in this instance? I would also expect the session to be destroyed at 30 seconds because sess_regenerate_destroy = TRUE, but that obviously isnt happening either.</p>
  
  <p>Thanks</p>