Reply to Re: $_SESSION unset for other user

Your name:

Reply:


Posted by avlee on 01/03/07 12:29

On Wed, 03 Jan 2007 13:15:11 +0100, David Gillen <Belial@RedBrick.DCU.IE=
> =

wrote:

> avlee said:
>> I have application in php where users login and logout.
>> I wanted to create function for administrator which will
>> delete all session's data for other users.
>> For example, each user session data is written in:
>> $_SESSION['$username']['data']
>>
>> I wanted to delete such information from administrator account.
>> $session_data =3D $_SESSION['$username']['data']
>> unset($session_data)
>> I provide username - and appripriate username session data is deleted=
..
>>
>> But i receive error that $_SESSION['$username']['data'] does not exis=
t.
>> I suppose that it's because of that it's stored in $users session - n=
ot
>> administrator session.
>> Is there any way to delete some information stored in somebody's else=

>> session ?
>>
> Technically yes. Delete all the session files on disk.
> Of course this will also delete your own session, although you could u=
se =

> your
> session id and filter out deleting that file.
> I would NOT advise doing this though.
>
> Depending what exactly you are trying to do and why, there may be ways=
to
> program around it. For example forcing a session reset using a flag in=
a
> database which other session would then check to see if they need to =

> delete
> their own data.

the problem is that i want to delete other users session data while he i=
s =

idle
(but only in very specified circumstances). So i can not set session =

timeout.
I can not do it from that user's session too (because he is idle - and
i do not want to do any refresh).
I wanted to do it from other user's session (administrator session - =

because i know that code will be called
periodically). Is there any other way ? (except deleting files) ?


Thanx

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация