简体   繁体   中英

Cakephp not destroying session at browser close

so my problem is that whenever i log in to the site using the Auth in cakephp and close it, it still brings me up to the index page of the site. i really don't know why cakephp does this, even if i close all the browser in my desktop and when i log in to the site, it still brings me to the index page which should be the log in page.

i tried doing this site cakephp-cookie-lifteime but still nothing happens

It is not issue of cake php or your server. Model browsers are not destroy session after browser closed.

Yes, in cakephp when you the close browser the session does not clear. You can update the following code in core.php file in app/config folder.

Configure::write('Session', array(
    'cookie' => 'my_app',
    'cookieTimeout' => 0,
    'checkAgent' => false,
    'timeout' => 60 //1 hr
));

It may take some time to take effect on the local server. Please add this code and check in server and other pc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM