Home >Database >Mysql Tutorial >How to Customize PhpMyAdmin\'s Automatic Logout Duration?
Customizing PhpMyAdmin's Automatic Logout Duration
PhpMyAdmin, a popular web interface for managing MySQL databases, automatically logs out users after a set period of 1440 seconds (24 minutes). While this default may be sufficient for some users, others may find it inconvenient. This article provides step-by-step instructions on how to modify or disable PhpMyAdmin's automatic logout feature.
Adjusting the Logout Duration
To change the automatic logout time, you need to edit the config.inc.php file located in PhpMyAdmin's configuration directory. Add the following lines to the file:
<code class="php">$sessionDuration = 60*60*24*7; // 60*60*24*7 = one week ini_set('session.gc_maxlifetime', $sessionDuration); $cfg['LoginCookieValidity'] = $sessionDuration;</code>
These lines set the session duration to one week (606024*7 seconds). You can adjust the value as needed to meet your requirements.
Disabling the Logout Feature
If you prefer not to have any automatic logout, you can remove the logout request entirely by adding the following line to config.inc.php:
<code class="php">$cfg['SessionKeepAlive'] = false;</code>
This modification will prevent PhpMyAdmin from automatically logging out users, allowing them to remain logged in indefinitely.
Important Notes:
The above is the detailed content of How to Customize PhpMyAdmin's Automatic Logout Duration?. For more information, please follow other related articles on the PHP Chinese website!