RE: [phplib] active_sessions management (php program included her e) From: Brian Popp (bpopp <email protected>)
Date: 03/02/01

The internal gc() function of the session class should delete those expired
rows whenever it runs. It gets called semi-randomly whenever a session is
updated. The frequency that it will run is based on the gc_probability
variable of the session class. 0 = never; 100 = always.

In other words, if these unused rows bother you, and you are not concerned
about performance, set the gc_probability variable very high 90-100.
Otherwise, just leave them as they are. For most systems, the default (5)
will work fine (5%).

Note that the session rows will not actually expire until their age exceeds
the gc_time variable.

bpopp - bpopp.net

-----Original Message-----
From: Thierry Bernardi [mailto:bernardi <email protected>]
Sent: Friday, March 02, 2001 4:01 AM
To: phplib <email protected>
Subject: [phplib] active_sessions management (php program included here)

Hello,

I have included here a PHP program (admtsk.php) to demonstrate the
problem I have.

I have discovered when I am using sess->delete() to end a connection; that
the
session data remain in the active_sessions table (forever it seems).

I believe this behavior abnormal. I wonder if I misuse the phplib or if this
is
a phplib bug.

Right now, I am doing the cleaning by hand with the help of "admtsk.php". I
would
like not to have to do cleaning so often.

Is there anyone to talk about this with me?

Thanks,

Thierry

PS: to keep this text short I give more information in the Post-Scriptum
(see further in this message)

----------------Post-Scriptum ------------------

I have started to look in the active_sessions table, because I was losing
track of
registered variables.

I discovered that way, that the session record remains in the
active_sessions table,
even after a call to sess->delete().

I have also discovered that my system may write several sessions records on
re-call to the very same page (I expect it to re-use the first opened
session data).
I believe all this closely connected to my lost registered variable bug.

The "admtsk.php" program display all those bugs (at least on my system) and
can be
used with the standard "local.inc" that comes with the phplib distribution.

Thank you for reading up to here!

Thierry Bernardi

e-mail (redirection to) home :
"thierrybernardi <email protected>"
e-mail (redirection to) work :
"thierrybernardi <email protected>"
address: 357 rue Kleber 83000 Toulon France
home:
33 4 94 36 09 26 [outside France]
04 94 36 09 26 [from France]
work:
33 4 94 16 23 08 [outside France]
04 94 16 23 08 [from France]
mobile:
33 6 84 91 17 26 [outside France]
06 84 91 17 26 [from France]

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>