You are here: Re: Exclusive session « PHP Programming Language « IT news, forums, messages
Re: Exclusive session

Posted by Gordon Burditt on 09/24/06 22:03

>>> How to make a session "exclusive"? When one attempts to open a new
>>> session either he's warned and asked to wait or any other openned
>>> session is closed.
>>
>> If a session is already open, PHP generally just uses that session
>> and does not try to open another one.
>It is a particular application: a remote interface to administrate a
>system. The idea is to prevent concurrent access to the system. Stop on
>one side, start on an other...
>
>>> The need is to force only one user at the same time.
>>
>> Since there are plenty of ways to leave a session without informing
>> PHP of that, this is going to be a severe problem. You can time
>> out sessions but that can be very annoying to your users. Indefinite
>> lockouts are even worse.
>>
>In this case, a direct close of any other openned session would not be a
>problem.

Don't be too sure. You never have browser crashes, modems dropping
carrier, power outages, or net outages, none of which close an open
session? You never get distracted and have to navigate elsewhere?

>>> I'm currently using the database but also looking at a php only solution.
>>
>> There really isn't a good solution, period, unless allowing a user
>> a maximum of zero sessions is acceptable.
>PHP does not give a client the direct knowledge of the existence of
>other connections. That's why I use the db for the moment.

Poking around the session save files of other sessions is a
possibility, but direct use of a database is probably more efficient
and less likely to cause trouble with two near-simultaneous login
attempts from different places.

 

Navigation:

[Reply to this 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

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