Home > Article > Backend Development > Analyze how to modify the default login timeout in phpmyadmin_PHP tutorial
After 1440 seconds of inactivity after logging in, I always log out automatically. I have to log in multiple times a day. I finally have time to solve this problem. I feel that the session has timed out. I searched online and found a solution. Hahaha , make a note here:
During use of phpmyadmin, "Login timeout (1440 seconds of inactivity), please log in again" often occurs, which is very annoying
The solution is as follows:
Modify php.ini and find
session.gc_maxlifetime = 1440
Just change the value to a larger value, and then make it take effect
I tried it, but the result didn’t work.
Final solution:
Find the phpMyAdmin/libraries/config.default.php file, open it, and modify it
$cfg['LoginCookieValidity'] = 1440;
Modify 1440 to a larger value.
Note: The value of $cfg['LoginCookieValidity'] cannot be greater than the value of session.gc_maxlifetime in php.ini, otherwise "Your PHP configuration parameters" will appear in phpmyadmin session.gc_maxlifetime (external link, English) is shorter than the cookie validity period you set in phpMyAdmin, so the validity period of your login session will be shorter than the time you set in phpMyAdmin." error.