FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » sessions timeout
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: sessions timeout [message #176506 is a reply to message #176410] Sun, 08 January 2012 19:17 Go to previous messageGo to previous message
Arno Welzel is currently offline  Arno Welzel
Messages: 317
Registered: October 2011
Karma:
Senior Member
The Natural Philosopher, 2012-01-04 11:51:

[...]
> Basically the code needs to do as a common FIRST THING in EVERY access
>
> get the cookie name/value pair and search your database for a value that
> matches it, and is less than X minutes since it was stored in the database.

Which means, nearly *every* access will result in a database access.

[...]
> I am sure you can get sessions to behave in this way, but it seems to me
> its a poor substitute for a database, if you have one.

For me it seems to be the opposite: A session can make things a lot
easier, since you don't have to handle hundrets or thousands of database
queries. Of course it makes sense to use a database to store user
accounts - but it should only be checked *once* at the time of login and
not at *every* request by the user.

I alread did an example for session timeout handling a while ago - well,
it also demonstrates using JavaScript to automatically tell the user
that the session timed out, but it also works without JavaScript:

See <http://arnowelzel.de/samples/sessiondemo.php>


--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Give me the names of some CRM php projects
Next Topic: transfering all MySQL rows to an array
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 01:50:43 GMT 2024

Total time taken to generate the page: 0.03921 seconds