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 on subdomains

Why is it, that when i use this code, that I found in another post:

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

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

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

    return $session;
};

Why is that I sill can't use sessions on my subdomain?

Maybe those sessions are stored in diffrent folders ?



40.6k
Accepted
answer

My bad, i just had to delete the subdomain.mydomain.com session, it coulden be overwrite by the root domain, it works just fine now :-)