RE: [Phplib-users] Why are my User Sessions didnt deleted if i lo gout ???
Brought to you by:
nhruby,
richardarcher
From: Taylor, S. <Ste...@uk...> - 2002-09-13 11:52:29
|
You dont need garbage collection because the aim of user session = variables is to remain persistant for the lifetime of each user (see my first explaination) Each user has one record in the user session table keyed on their user = id. When they first access the system this will be created new, and all the = user variables your application registers will be stored there with values particular to that user (all squashed up into one long string). If your application no longer requires a user session variable you can = add a call to unregister so that it will no longer be saved. =20 If user accounts are deleted from your application you can add a = function to remove the entry in the user session table for that user. -Stewart -----Original Message----- From: Benjamin Hoft [mailto:ho...@eu...] Sent: 13 September 2002 12:41 To: 'Taylor, Stewart' Subject: RE: [Phplib-users] Why are my User Sessions didnt deleted if i lo gout ??? hey yes you are right ! But for what ??? shouldn=B4t be the user sessions deleted also when i logout ? this could be a whole of garbage in the active sessions table I really want to know if this is really right whats going on on my = tables. Because i was really confused about it. And i am reading this = sourcecode a few day=B4s to understand what it really do. I am new to phplib and it is a few years ago that i am writing object orrientet. So please give me one answer is this really make=B4s a sense ? best regards and thanks for your help ;) Benjamin=20 Sorry for my english i am german ;) > ---------- > From: Taylor, Stewart[SMTP:Ste...@uk...] > Sent: 13 September 2002 13:30 > To: 'Benjamin Hoft' > Cc: 'php...@li...' > Subject: RE: [Phplib-users] Why are my User Sessions didnt deleted = if i lo gout ??? >=20 > If you have a look at the code (user.inc) the user class overrrides = the > session classes methods start, put_id and get_id. > In particular the start function no longer calls the gc method = (garbage > collection) >=20 > -Stewart. >=20 > -----Original Message----- > From: Benjamin Hoft [mailto:ho...@eu...] > Sent: 13 September 2002 11:18 > To: 'Taylor, Stewart' > Subject: RE: [Phplib-users] Why are my User Sessions didnt deleted if = i > lo gout ??? >=20 >=20 > hmm i think you didnt understand me right. >=20 > I want to know why the entries in the table active_sessions > like=20 >=20 > SID name val >=20 > c14cbf141ab1b7cd009356f555b607dc Example_User > RXhhbXBsZV9Vc2VyOiR0aGlzLT5pbiA9ICcwJzsgJHRoaXMtPn...=09 > changed > 20020913110514 > b34e427d4fc7784f5a8e21dc78516fbc Example_Session > RXhhbXBsZV9TZXNzaW9uOiR0aGlzLT5pbiA9ICcwJzsgJHRoaX... > 20020913111430 >=20 > wont be deleted after i logout. >=20 >=20 > the entries with the name "Example_Session" will be deltet by the > GarbageCollector (GC) after they had expired. > But the entries with the name "Example_User" won=B4t :( >=20 > But this seams wrong to me.=20 > Because i cannot find out which of my registred Users currently = logged on. > Only if i make a Select which will exclude the ones which haven=B4t = changed in > the last eg. 5 minutes. >=20 > But the name of the Table "active_sessions" will be wrong when all = ever > logged in and authet user sessions will remain in this table. >=20 > I thought that they will deleted by the gc also because the User = class is > extended from the session class and the session class have this gc funktion. >=20 >=20 > Or am I so confused ??? >=20 > thanks for your patience >=20 > Benjamin=20 >=20 >=20 > > ---------- > > From: Taylor, Stewart[SMTP:Ste...@uk...] > > Sent: 13 September 2002 11:41 > > To: 'Benjamin Hoft' > > Cc: 'php...@li...' > > Subject: RE: [Phplib-users] Why are my User Sessions didnt deleted = if > i lo gout ??? > >=20 > > I think you are confusing how user session variables are designed = to be > > used. > > A user session variable is associated with a user as long as they = exist. > > Every time a user logs back in their user session variables will be > > recreated. For example if you have a database application say to create > > purchase orders, with fields such as department, telephone = extension, > site. > > These fields are unlikely to change very often for a particular = user. So > > rather than the user entering these fields from scratch each time, = you can > > populate the fields from user session variables that store the = users > > previous entries made in these fields. > >=20 > >=20 > > -Stewart > >=20 > > -----Original Message----- > > From: Benjamin Hoft [mailto:ho...@eu...] > > Sent: 13 September 2002 10:12 > > To: 'php...@li...' > > Subject: [Phplib-users] Why are my User Sessions didnt deleted if i > > logout ??? > >=20 > >=20 > > My problem is that my User Sessions named "Example_User" > > won=B4t be deleted after I logout. > >=20 > > And i soposed they should be deleted :(>=20 > >=20 > > My "Example_Session" will be deleted from the garbage collector. > >=20 > > Why ? any sugesstions ? > >=20 > > i only see in my mysql logs something like this when the GC was = started > > DELETE FROM active_sessions WHERE changed < '20020913110203' AND = name =3D > > 'Example_Session' > >=20 > > but nothing like=20 > > DELETE FROM active_sessions WHERE changed < '20020913110203' AND = name =3D > > 'Example_User' ??? > >=20 > > Why ??? > >=20 > >=20 > >=20 > >=20 > >=20 > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Phplib-users mailing list > > Php...@li... > > https://lists.sourceforge.net/lists/listinfo/phplib-users > >=20 >=20 |