Date: 07/03/00
- Next message: Gerald Estadieu: "Re: [phplib] Registration page validation problem"
- Previous message: Carl Youngblood: "[phplib] Hybrid login form?"
- In reply to: Marc Rossi: "[phplib] active session list"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Jul 03, 2000 at 11:50:08PM +0200, Marc Rossi wrote:
> Given that there is no way to automatically deal with gc in the active sessions table,
> what would be the proper method to display a list of "active" sessions?
HTTP being stateless, I think the only proper way to differentiate
between active and timed-out sessions is timestamps. For this PHPLIB allows
you to set $gc_time and $gc_probability in your overriding session class.
$gc_probability is in percent of a garbage collection each time when the
session table is written to, so 100 should be very predictable but maybe
slow down a bit. The documentation(3) example recommends 5% for normal
usage, so does the example in local.inc, the default is 1%.
$gc_time is the time in minutes session objects persist. Default is
1440 (one day).
You may override these in your derived session class if you want other values.
For more details: cd phplib-7.2b/php; grep gc_proba *; grep gc_time *
If for whatever reason you want to manipulate or check the active_sessions
table timestamps directly, you can get them with a "SELECT * FROM
active_sessions WHERE changed < ...". Depending on your ct_sql settings
, session objects will be addslashed or base64 encoded. Simply base64decode()
and unserialize() to see more.
HTH, Holger
http://petition.eurolinux.org
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: Gerald Estadieu: "Re: [phplib] Registration page validation problem"
- Previous message: Carl Youngblood: "[phplib] Hybrid login form?"
- In reply to: Marc Rossi: "[phplib] active session list"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

