Skip to main content

Can PHP track sessions and timeout user after x amount of idle time in an Apache and WebSphere Application Server on a Z system environment.

Can PHP track sessions and timeout user after x amount of idle time in an Apache and WebSphere Application Server on a Z system environment.

There are a lot of tools to logout a user after inactive
time. Here is one example:

http://www.dynamicdrive.com/forums/showthread.php?25939-Automatic-Logout-after-15-minutes-of-inactive

Rocket will have more information on this shortly.


Can PHP track sessions and timeout user after x amount of idle time in an Apache and WebSphere Application Server on a Z system environment.

It was taken from link http://www.dynamicdrive.com/forums/showthread.php?25939-Automatic-Logout-after-15-minutes-of-inactive:

<?php session_start(); $inactive = 10; // Set timeout period in seconds if (isset($_SESSION['timeout'])) { $session_life = time() - $_SESSION['timeout']; if ($session_life > $inactive) { session_destroy(); header("Location: logoutpage.php"); } } $_SESSION['timeout'] = time(); ?>

This example works correctly. It redirect to another page(logoutpage.php) after “10” minutes of inactive.