$di->setShared('session', function () {
$session = new SessionAdapter();
if(!isset($_SESSION)){
$session->start();
}
return $session;
});
|
Oct '15 |
3 |
1612 |
0 |
ok, so my guess would be server configuration problem.
what os, which version, where do you store sessions - files, redis, db ?
Is the server load balanced ?
Does the session directory exist ? if you go to it, does the php put files in there ? ( test it with simple test.php <?php session_start(); ?>
there are some sesssion changes in 2.0.8 according to https://blog.phalcon.io/
is it possible to upgrade and test it out ?
also is it possible to have a missplaced session_destroy somehere ?. Can you explain more how to you test it ? ( ex. I start the app , i login then i click on this button which does ajax, and boom session is empty inside ... )
//edit
also try with this just in case :
$di->setShared('session', function() {
$session = new \Phalcon\Session\Adapter\Files();
$session->start();
return $session;
});