title: Strange Zend_Session behaviour using Zend_Application
body: <p>I'm writing to see if someone of you guys has encountered this problem before and have a chance to understand why it happened to me.</p>
  
  <p>This is the story.</p>
  
  <p>I developed many ZF applications before Zend Framework v. 1.8, then I've stopped for about 18 months. Now I had to start a new project on which I decided to use Zend Framework again.</p>
  
  <p>On my local server I had the version 1.11.3 installed, so I didn't download the latest release.</p>
  
  <p>Before the use of Zend_Application with the Bootstrap.php file I used to start sessions putting my session options in my config.ini file and then loading them into a Zend_Session instance like this:</p>
  
  <p>config.ini</p>
  
  <pre><code>sessions.name = NAME
  sessions.use_only_cookies = 1
  sessions.save_path = APPLICATION_PATH "/../tmp/sessions"
  sessions.strict = on
  sessions.remember_me_seconds = 1800
  </code></pre>
  
  <p>index.php (into the public webserver directory) before starting the application:</p>
  
  <pre><code>Globals::startSession();
  </code></pre>
  
  <p>custom Globals class with various useful methods:</p>
  
  <pre><code>    class Globals
      {
              static public function startSession()
              {
              $sessions_conf = self::getConfig()-&gt;sessions;
              Zend_Session::setOptions($sessions_conf-&gt;toArray(););
              Zend_Session::start();
              }
      }
  </code></pre>
  
  <p>This has always worked very well, enabling my sessions (used with Zend_Session_Namespace) and storing the session files in the save_path.</p>
  
  <p>With Zend_Application the manual tells to simply store the session options in the application.ini file under the "section" resources and Zend_Session will be configured automatically...</p>
  
  <p>I did it like this:</p>
  
  <pre><code>; SESSIONS
  resources.session.name = NAME
  resources.session.use_only_cookies = 1
  resources.session.save_path = APPLICATION_PATH "/../tmp/sessions"
  resources.session.strict = on
  resources.session.remember_me_seconds = 1800
  </code></pre>
  
  <p>It didn't worked.
  So I tried to use (not at the same time!) the _initSession() and _initForceSession() methods in the Bootstrap.php file, putting them at the beginning of the class and writing into them the code:</p>
  
  <pre><code>$this-&gt;bootstrap('session');
  </code></pre>
  
  <p>But session were never working, data were not stored between http requests and session files were never written into the save_path...</p>
  
  <p>Could anyone, please, let me know if this is a normal behaviour (maybe I have missed something somewhere...)?</p>
  
  <p>Obviously I solved the problem re-implementing my older method (and it works perfectly), but I would like to learn how to use it correctly.</p>
  
  <p>Thanks in advance.</p>