title: Fatal:error - session has already been started by session.auto-start or session_start()
body: <p>I am working on web app in zend framwork and implementing login and logout coding in it.The auth adapters are working well.
       The problem is that, after authenticating and checking identity it shows the correct redirect url in the address bar, but the page shows the error instead of showing the view</p>
  
  <p>here are the errors<br/>
  <strong>Fatal error: Uncaught exception 'Zend_Session_Exception' with message 'session has already been started by session.auto-start or session_start()' in C:\Users\amrit\Zend\workspaces\DefaultWorkspace7\webDeveloper\library\Zend\Session.php on line 462</strong><br/><br/></p>
  
  <p><strong>Zend_Session_Exception: session has already been started by session.auto-start or session_start() in C:\Users\TranceServe\Zend\workspaces\DefaultWorkspace7\webDeveloper\library\Zend\Session.php on line 462</strong><br/>
  and when I click refresh, its shows the correct view.The logout code is working well.</p>
  
  <p>Here is my zend code<br/></p>
  
  <pre><code>public function adminloginAction ()
  {
      $login = new Admin_Form_Login();
      $login-&gt;setAction("adminlogin");
      $login-&gt;setMethod("POST");
      if (isset($_SESSION)) {
          echo ("start");
        } else {
          echo ("not started");
      }
      if ($this-&gt;_request-&gt;isPost() &amp;&amp; $login-&gt;isValid($_POST)) {
          $adapter = new webDeveloper_Auth_StaffAdapter(
          $this-&gt;getRequest()-&gt;getParam("email"), 
          ($this-&gt;getRequest()-&gt;getParam("pwd")));
          $result = Zend_Auth::getInstance()-&gt;authenticate($adapter);
          if (Zend_Auth::getInstance()-&gt;hasIdentity()) {
             $this-&gt;_redirector-&gt;gotoUrl('/admin/index');
          } else {
              $this-&gt;_redirector-&gt;gotoUrl('/admin/adminauthentication/adminlogin');
          }
      }
      $this-&gt;view-&gt;form = $login;
  }
  </code></pre>