Starting the Zend Framework 2 Session Manager

One way to start the session with Zend Framework 2 (2.0.3 dev) is as below written.

// public/index.php
$manager = new \Zend\Session\SessionManager();
  1. Start the session manager
  2. Get the session config object
  3. Set httpOnly cookies for better xss security
  4. Set your session name
  5. Start the session

There are many other options which i have not tested yet, but this options are mandatory in my opinion.

Lp. Silvester

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.