title: Unable to use Zend_Auth and Zend_Session_SaveHandler_DbTable in a Zend_Application
body: <p>I am using Zend_Session_SaveHandler_DbTable to store my sessions in the database. I have the following in my application.ini</p>
  
  <pre><code>resources.session.save_path = APPLICATION_PATH "/../data/sessions"
  resources.session.use_only_cookies = true
  resources.session.remember_me_seconds = 864000
  resources.session.saveHandler.class = "Zend_Session_SaveHandler_DbTable"
  resources.session.saveHandler.options.name = "session"
  resources.session.saveHandler.options.primary.session_id = "session_id"
  resources.session.saveHandler.options.primary.save_path = "save_path"
  resources.session.saveHandler.options.primary.name = "name"
  resources.session.saveHandler.options.primaryAssignment.session_id = "sessionId"
  resources.session.saveHandler.options.primaryAssignment.save_path = "sessionSavePath"
  resources.session.saveHandler.options.primaryAssignment.name = "sessionName"
  resources.session.saveHandler.options.modifiedColumn = "modified"
  resources.session.saveHandler.options.dataColumn = "session_data"
  resources.session.saveHandler.options.lifetimeColumn = "lifetime"
  resources.session.saveHandler.options.userIdColumn = "user_id"
  </code></pre>
  
  <p>The sessions seem to save correctly in the database.</p>
  
  <p>The problem is that when I call Zend_Auth::getInstance()->hasIdentity() in the application, it will eventually call Zend_Session::start(true) which will cause the error:</p>
  
  <blockquote>
    <p>Fatal error: Uncaught exception 'Zend_Session_Exception' with message 'session has already been started by session.auto-start or session_start()' in C:\Program Files (x86)\Zend\Apache2\htdocs\myapp\library\Zend\Session.php:462 Stack trace: #0 C:\Program Files (x86)\Zend\Apache2\htdocs\myapp\library\Zend\Session\Namespace.php(143): Zend_Session::start(true) #1 C:\Program Files (x86)\Zend\Apache2\htdocs\myapp\library\Zend\Auth\Storage\Session.php(87): Zend_Session_Namespace->__construct('Zend_Auth') #2 C:\Program Files (x86)\Zend\Apache2\htdocs\myapp\library\Zend\Auth.php(91): Zend_Auth_Storage_Session->__construct() #3 C:\Program Files (x86)\Zend\Apache2\htdocs\myapp\library\Zend\Auth.php(141): Zend_Auth->getStorage() #4 C:\Program Files (x86)\Zend\Apache2\htdocs\myapp\application\modules\default\views\scripts\layout.phtml(29): Zend_Auth->hasIdentity() #5 C:\Program Files (x86)\Zend\Apache2\htdocs\myapp\library\Zend\View.php(108): include('C:\Prog in C:\Program Files (x86)\Zend\Apache2\htdocs\myapp\library\Zend\Session.php on line 462</p>
  </blockquote>
  
  <p>since Zend_Session_SaveHandler_DbTable already started the session. I though that Zend_Session_SaveHandler_DbTable would automatically have Zend_Auth store the session information in the database.</p>
  
  <p>Is there something I am missing here or have not configured correctly?</p>