Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

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';


81.8k

What OS is Phalcon running on?

Ubuntu 13.04 64 bit



81.8k

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: http://phosphorum.com/test.php

Sorry maybe you have a mistake with

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

try

$session = new Files();



81.8k
Accepted
answer

Could you try again please using 1.3.1?

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