Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Is there session cookie lifetime in cakephp 3?


Asked by Mathias Gonzalez on Nov 30, 2021 FAQ



There's session timeout, and there's session cookie lifetime. The latter isn't affected by the former, which is configurable in the CakePHP configuration as shown in your code snippet, and is handled by CakePHPs session handler. Check your PHP installations session.cookie_lifetime setting, it might be the cause of the issue.
Just so,
If you need to change it, either do that in your php.ini, or use the ini option in the CakePHP session configuration. By default PHP sets the session cookie to expire as soon as the browser is closed, regardless of the configured Session.timeout value.
And, CakePHP provides a wrapper and suite of utility features on top of PHP’s native session extension. Sessions allow you to identify unique users across requests and store persistent data for specific users. Unlike Cookies, session data is not available on the client side.
Subsequently,
Sessions allow you to identify unique users across requests and store persistent data for specific users. Unlike Cookies, session data is not available on the client side. Usage of $_SESSION is generally avoided in CakePHP, and instead usage of the Session classes is preferred.
Thereof,
If set to true then PHP will attempt to send the httponly flag when setting the session cookie. Returns true on success or false on failure. path, domain , secure and httponly are nullable now.