Skip to main content
Mar 11, 2016 5:22 PM UTC

Can PHP track sessions and timeout a user in an Apache and WebSphere Application Server on a Z system

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.

    2 replies

    Mar 14, 2016 11:12 AM UTC

    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.

    Mar 15, 2016 7:27 AM UTC

    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.