We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

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 won't timeout


I am not sure if there is a bug raised or I am doing something totally wrong but I am setting my session like so:

    $session = new SessionAdapter();

    $session->setOptions(array('lifetime' => 60));

    return $session;

When I do:


It returns int(60)

I then check if the session has expired after 60 seconds, 60 minutes, 60 hours and it never expired, am I doing something wrong ?

I was thinking maybe the php.ini timeout value could be overwriting it ?

edited Apr '14

This has been fixed I did the following:

    $session = new SessionAdapter();


    return $session;

@digitronac helped with this and all credit goes to him.