Martin Zvarík wrote:
Hi,
I was looking all over the internet and I don't understand when and
how does the PHP session expirate.
I suppose that it happens when the user is inactive.
On my website I don't use cookies for session and it has standard
php.ini configuration:
session.gc_maxlifetime = 1440
gc = garbage collector.
the ammount of seconds of inactivity for a given session id is allowed,
after which the session data is seen as garbage - it will then be removed
at the next run of the garbage collector, I have no idea whether a session id that
comes in for a session marked as garbage, if the garbage collector has not yet run,
is honoured or seen as a new session.
session.gc_divisor = 100
session.gc_probability = 1
these two controls how often/likely the garbage will run (running
it on every request would be a major performance hit)
session.cache_expire = 180
this affects cachable pages that are using the session - after this time
the page must be refreshed at the server (i.e. the browser cache is invalidated).
basically this has to do with the default cache-related headers that
are sent out by php when you are using sessions.
So, does this mean, that if the visitor is 180 minutes inactive it
automatically deletes the session ??
no see above :-). check out the manual for more info:
http://php.net/manual/en/ref.session.php#session.configuration
Thanks,
Martin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php