问题
I have a WAMP server installed locally and developing some small project. I've added an authorization page with sessions.
All the PHP settings on my localhost are default, so it means that session.gc_maxlifetime = 1440, so it equals to 24 minutes. But the problem is that this session does not end. Never.
I tried to change that setting to 60 seconds, or even 600 seconds, but it is infinite anyway.
Can you, please, explain me, is it a problem or I have just forgotten to change some other settings?
P.S. I know I have to restart server to completely change settings.
回答1:
From the documentation....
session.cookie_lifetime specifies the lifetime of the cookie in seconds which is sent to the browser. The value 0 means "until the browser is closed." Defaults to 0. See also session_get_cookie_params() and session_set_cookie_params().
来源:https://stackoverflow.com/questions/18682735/php-infinite-session