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

Session service to be valid accross all subdomains

Hi, Is there a way to set options in Phalcon\Session\Adapter\Files to be valid accross subdomains? Maybe the equal way of:

$some_name = session_name("some_name");
session_set_cookie_params(0, '/', '.some_domain.com');
session_start();


98.9k

Currently, there is no way to set up those options via Phalcon\Session\Adapter, however, you can set them before start the session:

$di['session'] = function() {

    session_set_cookie_params(0, '/', '.some_domain.com');

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

    return $session;
};


5.3k

This should be added into official doc under "session" chapter.