Home > Database > Mysql Tutorial > How to Extend or Disable Auto Logout in phpMyAdmin?

How to Extend or Disable Auto Logout in phpMyAdmin?

Patricia Arquette
Release: 2024-10-29 06:09:31
Original
958 people have browsed it

How to Extend or Disable Auto Logout in phpMyAdmin?

How to Customize phpMyAdmin Auto Logout Time

phpMyAdmin, a popular MySQL management tool, has a default automatic log out time of 1440 seconds (24 minutes). This may be too short for users who need to stay logged in for extended periods. Here's how to adjust or disable this setting:

Adjust Log Out Time:

To change the log out time specifically for phpMyAdmin, edit the config.inc.php file located in the phpMyAdmin installation directory. Add the following lines:

$sessionDuration = 60*60*24*7; // 60*60*24*7 = one week
ini_set('session.gc_maxlifetime', $sessionDuration);
$cfg['LoginCookieValidity'] = $sessionDuration;
Copy after login

This code sets the session duration to one week (60 minutes 60 seconds 24 hours * 7 days). You can adjust this value to suit your requirements.

Disable Log In Request:

If you want to remove the automatic log out feature entirely, comment out the following line in the config.inc.php file:

$cfg['LoginCookieValidity'] = $sessionDuration;
Copy after login

This will allow users to stay logged in indefinitely until they manually log out.

Additional Note:

Remember to restart phpMyAdmin after making these changes to apply them. If you encounter any issues, consult the phpMyAdmin documentation for further assistance.

The above is the detailed content of How to Extend or Disable Auto Logout in phpMyAdmin?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template