Answer the question
In order to leave comments, you need to log in
Why are cookies being reset?
Used to authorize cookies with php sessions. But as I close the browser, the cookie, like the session, disappears. Through the back I set them a lifetime of 2 days.
The code has already been used in two projects for authorization, but this time something does not work. Through the browser I check the lifetime, everything is correct, but when closed it is still destroyed.
Answer the question
In order to leave comments, you need to log in
Tested on different computers in different browsers?
Is the behavior the same locally and on hosting?
1) There is a setting in the browser "Destroy cookies after exiting the browser"
2) Maybe there is not enough disk space on the computer from which you are accessing
3) Google what are the settings in .htaccess/php.ini related to cookies
It is possible that apart from
php_value session.cookie_lifetime 1200
php_value session.gc_maxlifetime 1200
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question