I'm setting $_SESSION in a part of my application which is not routed by Zend. (myhost.local/example.php -> set $_SESSION['user'])
Now I want to access the $_SESSION['user'] in my Zend application.
(myhost.local/newgeniuszend/index -> cant get the $_SESSION['user'])
What can I do?
In Zend Framework you should not interact with the php
$_SESSIONglobal directly. Instead you should use the session tools that are shipped with ZF2 in thezend-sessionmodule. For session management there is a so called session-manager (Zend\Session\SessionManager).Refer to the official ZF2 documentation here.
There are a lot of questions and answers about how to handle sessions in Zend Framework 2 on stackoverflow. If you search through those posts you probably will get answers to all your questions related to this topic.