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

phalcon cookies


class SessionController extends Phalcon\Mvc\Controller
    public function loginAction()
        if ($this->cookies->has('remember-me')) {

            $rememberMe = $this->cookies->get('remember-me');

            $value = $rememberMe->getValue();


    public function startAction()
        $this->cookies->set('remember-me', 'some value', time() + 15 * 86400);


In your loginAction all I can see is that you're getting the cookie. That means you have to first call startAction to set your cookie.

I see you're following https://docs.phalcon.io/en/latest/reference/cookies.html

I have to warn you that is just an example and not secure enough for persistent sessions.


有问题可以加我发我邮箱[email protected]或者qq 525695314