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 path

I wondered that Phalcon\Session\Adapter\Files haven't any methods to set custom directory for saving session files. If we have multiple installations of the same app on the same server, prefixes isn't helpful. I think that ability to specify working directory is must-have feature for file-based session handler.

edited Jul '15

You can set the session.save_path before start the session:

$di->set('session', function() {
    session_save_path('/my/awesome/path');

    $session = new SessionAdapter();
    $session->start();
    return $session;
}, true);


4.3k
Accepted
answer

Of course. Just wondering because session.save_path is the configuration option for any file-based session save handler, but it's not wrapped with any framework entities.