title: Zend Framework - session id regenerated, can't stay logged in
body: <p>I'm trying to store sessions in a database using Zend Sessions however for some reason my sessions die out. Im not sure if there's some code being executed which does this or whether its something else.</p>
  
  <p>I've noticed that the session ID seems to be regenerated after a breif time after having logged in.</p>
  
  <p>This is even despite having added the following line in my htaccess file:</p>
  
  <pre><code>php_value session.auto_start 0
  </code></pre>
  
  <p>The end result is that I'm logged out every minute I'm logged in.</p>
  
  <p>Heres my code in my bootstrap file</p>
  
  <pre><code>$config = array(
      'name'           =&gt; 'session',
      'primary'        =&gt; 'id',
      'modifiedColumn' =&gt; 'modified',
      'dataColumn'     =&gt; 'data',
      'lifetimeColumn' =&gt; 'lifetime'
  );
  
  
  $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
  Zend_Session::rememberMe($seconds = (60 * 60 * 24 * 30)); 
  
  $saveHandler-&gt;setLifetime($seconds)-&gt;setOverrideLifetime(true); 
  
  Zend_Session::setSaveHandler($saveHandler);
  //start your session!
  Zend_Session::start();
  </code></pre>
  
  <p>I'm not using any other session related function except perhaps for Zend_Auth when logging in. </p>
  
  <p>Infact <code>rememberme</code> calls the regenerateID function of the Session class - the end result is that I'm constantly logged out every few minutes now.</p>