We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Error with Session in new phalcon version 1.3.0

If I create new session adapter or use external session adapter from phalcon incubator I have error without any error messages, when I trying add new value to Session\Bag

class Files extends \Phalcon\Session\Adapter implements \Phalcon\Session\AdapterInterface
{

}

$di = new \Phalcon\Di();
$di->setShared('session', function() {
    $session = new Files();
    $session->start();
    return $session;
});
$bag = new \Phalcon\Session\Bag('test');
$bag->test = 'test';


98.9k

What OS is Phalcon running on?

Ubuntu 13.04 64 bit



98.9k

I'm unable to reproduce the bug, I have the same OS but it works fine.

This script:

class Files extends \Phalcon\Session\Adapter implements \Phalcon\Session\AdapterInterface
{

}

$di = new \Phalcon\Di();
$di->setShared('session', function() {
    $session = new \Phalcon\Session\Adapter\Files();
    $session->start();
    return $session;
});
$bag = new \Phalcon\Session\Bag('test');
$bag->test = 'test';

var_dump($_SESSION);

echo '<br>';
echo php_uname('a'), '<br>';
echo 'Version: ', Phalcon\Version::get(), '<br>';
echo 'PHP: ', PHP_VERSION, '<br>';

Is running here: https://phosphorum.com/test.php

Sorry maybe you have a mistake with

$session = new \Phalcon\Session\Adapter\Files();

try

$session = new Files();



98.9k
Accepted
answer

Could you try again please using 1.3.1?

Hello again, i've got the same pb...