Home    Site Stuff    Site Feedback
#1

Increase Timeout?

Archive: 4 posts


Don't know if this is something that can be easily put into the site, but with long posts, I am constantly being timed out and have to log back in again which is a pain!

I understand the security reasons, but the limit is possibly too short.

Does everyone else have this problem?


For ConfusedCartman....

Don't know if you use sessions or cookies for login.

If you wanted to change it, it should be a simple inclusion into the header page (included? include()?)



session_start();//no need to duplicate

// set timeout period in seconds
$inactive = 600;

// check to see if $_SESSION['timeout'] is set
if(isset($_SESSION['timeout']) ) {
$session_life = time() - $_SESSION['timeout'];
if($session_life > $inactive)
{ session_destroy(); header("Location: logoutpage.php"); }//whatever page says you are logged out.
}
$_SESSION['timeout'] = time();


Is this feasible?

Rhy
2009-07-29 14:57:00

Author:
Rhyfelwr
Posts: 606


Hm... wouldn't just clicking "Remember Me" prevent you from logging out?2009-07-29 15:13:00

Author:
RockSauron
Posts: 10882


Hm... wouldn't just clicking "Remember Me" prevent you from logging out?

LOL - what a pratt I am!!!

Didn't know these were persistent cookies!

I was thinking that if we were switching users on the same laptop, we couldn't do this.. but I was wrong - thanks Rock.

Rhy

Admin - please close this thread before I make even more of a fool of myself :blush:

EDIT
_________

Oooh - just thought of someting to justify myself.. what if you have cookies blocked in your security settings?

Nah that's lame - I still look a pratt.
2009-07-29 15:29:00

Author:
Rhyfelwr
Posts: 606


Eh, that's ok- you're not the first guy who had a deep knowledge of programming and vbulletin software who made a topic like this forgetting about that button . You're the second, so at least take comfort in the fact that someone else made a topic like this with a solution that got in depth... Meyep.2009-07-29 16:44:00

Author:
RockSauron
Posts: 10882


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.