...

View Full Version : Are Session Expirations possible in PHP?



jessjenn
01-21-2004, 12:43 AM
I'm wondering if this is possible. I was suggested to do the following to expire a session:

session_cache_expire(5); // expires in 5 minutes
session_start();


The problem is that the session does not expire. I use that for a login script and I'm still able to browse after more than a day goes by and even if the browser is closed. Is there a way to do this without changing a configuration file? I've searched other posts and the manual without luck.

Do other web apps that use login scripts rely on setcookie or sessions? Any help is appreciated. Thanks!

Nightfire
01-21-2004, 05:31 AM
A session expires automatically after 26 - 30 mins if the user is idling. 5 mins is a bit short

stuartc1
01-21-2004, 11:32 AM
This function is only available to version 4.2.0...

Anyways it recommended you use session_cache_limiter (http://uk.php.net/manual/en/function.session-cache-limiter.php) along with it. I recommened you have a look at the users comments on that pages as IE can produce some strange results unless you configure php correctly to avoide this.

Cheers,
Stuart



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum