I was wondering what stipulations there were for utilizing Phalcon\Session\Adapter\Files in multi module applications.
I have two modules and start the session (only once) in my config file in a boilerplate fashion:
$di->setShared('session', function() {
$session = new Phalcon\Session\Adapter\Files();
$session->start();
return $session;
});
However, in only one module, when I dump the session variable, do I get protected _started => boolean true
.
I realize this isn't a lot to go on, but I've been debugging it all morning to no avail.
Both module's routing is working as it should.
Edit: what really drives me nuts is that on our production server the session is started in both modules, so only in the dev environment is it not. which means this probably isn't really phalcon related.
When I go to a controller, say IndexController.php, and put in $this->session->start();
in the indexAction() it still fails to return true
in the view. But if in the view is use <?php session_start(); var_dump($_SESSION); ?>
it works. And if I try the Volt alternative {{ this.session.start() }}
it says a session is already started. :p