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.

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 ?



13.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 :-)