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 #176409 is a reply to message #176406] Wed, 04 January 2012 08:20 Go to previous messageGo to previous message
Arno Welzel is currently offline  Arno Welzel
Messages: 317
Registered: October 2011
Karma:
Senior Member
Michael Joel, 2012-01-04 02:42:

> I am on a shared server so I have no control over the settings.
>
> Is there a way for me to set a "timeout" for sessions?

Maybe using ini_set() to modify session.cookie_lifetime - but i'm not
sure if this is possible.

Another way would be to manage this "manually" - e.g. using the current
time and the time of the last activity of the user:

1) When the session is created also store the current time as a session
variable.

2) If there is already a session compare the current time with the time
recorded in the session and then either destroy the session, if the time
span is too long OR update the time in the session.

> I am working on some scripts (logged in as a test user) and had been
> away from it for a few hours. The tabs (this is Opera browser) were
> closed, but not the browser.
>
> When I went back to the page it still had me logged in.

Sure - the cookie is still there as long as the browser is running.

> Obviously the server session cookies are set to clear when the browser
> closes.
>
> Is there a way for me to have some control over this and set a time
> limit so after a reasonable amount of time the session cookie clears?

See above.


--
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: Thu Nov 28 21:02:13 GMT 2024

Total time taken to generate the page: 0.03854 seconds