Extending phpMyAdmin's Automatic Logout Time
By default, phpMyAdmin automatically logs out users after 1440 seconds (24 minutes) of inactivity. However, some users may find this duration too short. This article explores how to customize this timeout or even disable the logout altogether.
To adjust the automatic logout time specifically for phpMyAdmin, users can modify the config.inc.php file. Here's a step-by-step guide:
$sessionDuration = 60*60*24*7; // 60*60*24*7 = one week ini_set('session.gc_maxlifetime', $sessionDuration); $cfg['LoginCookieValidity'] = $sessionDuration;
The code snippet above sets the session duration to one week (606024*7 seconds). Users can adjust this value to their desired duration. By default, phpMyAdmin uses the session.gc_maxlifetime value of the server, which is set in php.ini.
To completely disable the automatic logout, users can comment out the following lines in the config.inc.php file:
$cfg['LoginCookieValidity'] = $sessionDuration;
This modification ensures that users remain logged in indefinitely until they manually log out or close their browser.
It's important to note that changing php.ini will affect the session duration for all websites running on the server. Therefore, it's recommended to only modify phpMyAdmin's config.inc.php file to avoid unintended consequences.
The above is the detailed content of How to Extend or Disable Automatic Logout in phpMyAdmin?. For more information, please follow other related articles on the PHP Chinese website!