4
Contributors
6
Replies
26
Views
2 Years
Discussion Span
Last Post by minitauros
0

When a session is completely destroyed is not always up to you. A user himself can decide when he wants to clear all website data. That can be when he closes the browser, but that can also be when he closes a tab. The only thing you have influence on is when you destroy their session, which can be, for example, when they press a "logout" button. But if you do NOT destroy their session, it will live until they clear their cookies/cache/etc.

0

sessions destroy itself after 30 minutes from time created, or when user closes the browser

0

sessions destroy itself after 30 minutes from time created, or when user closes the browser

Since when is that so? :o

Votes + Comments
Reversing the downvote. Harsh wasn't it?
0

sessions destroy itself after 30 min

Since when is that so? :o

its in default configraion for PHP
session.gc_maxlifetime in php.ini

0

From http://php.net/manual/en/session.configuration.php :

session.gc_maxlifetime specifies the number of seconds after which data will be seen as 'garbage' and potentially cleaned up. Garbage collection may occur during session start (depending on session.gc_probability and session.gc_divisor).

I must admit that I've never looked into this any further than reading what I just quoted. Could you expand a bit more upon this subject? What does "potentially cleaned up" mean, specifically?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.