> If I use sessions (not session cookies) by issuing a session_start() and
> then log in to an area of my web site, I understand that the session will
> last until either I close my browser or issue a session_unset() followed
by
> a session_destroy().
>
> If I log in and walk away from my PC, will the session eventually expire
or
> will I have to do one of the above?

They will eventually get cleaned up by PHP if you are using the
session_save_path as specified in php.ini. There are settings in php.ini
that control how often this happens:

a.. session.gc_probability specifies the probability that the gc (garbage
collection) routine is started on each request in percent. Defaults to 1.

a.. session.gc_maxlifetime specifies the number of seconds after which data
will be seen as 'garbage' and cleaned up.

  Note: If you are using the default file-based session handler, your
filesystem must keep track of access times (atime). Windows FAT does not so
you will have to come up with another way to handle garbage collecting your
session if you are stuck with a FAT filesystem or any other fs where atime
tracking is not available.



  ---John Holmes...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to