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.

Transfer of 'external' $_SESSION to phalcon

Hi, If we try to integrate phalcon with a standalone library\script which uses its own native $SESSION what is the best way to transfer the $SESSION to the Phalcon environment.

We can get this working like below but we think this is probably not a good method to do a session_start()

$di->setShared('session', function() {
    $session = new Phalcon\Session\Adapter\Files();
    $session->set('test', $_SESSION);
    return $session;


You don't need to do this, accessing $session->get('test') is like doing $_SESSION['test']


So simple I didn't see it. Thank you.