Applicable to:
- Plesk for Linux
- Plesk for Windows
Question
How to increase or modify the timeout limit of a login session in phpMyAdmin?
Answer
- Plesk for Linux:
- Connect to the server via SSH
-
Go to the file path
/usr/local/psa/phpMyAdmin/:# cd /usr/local/psa/phpMyAdmin/
-
Create the file
config.inc.phpif it doesn't exist copying the template filelibraries/config.default.php:# if [ ! -f config.inc.php ]; then cp -a {libraries/config.default.php,config.inc.php}; fi
-
Edit the file
config.inc.phpwith a text editor:# vi config.inc.php
-
Change the value of the parameter
LoginCookieValidity:CONFIG_TEXT: $cfg['LoginCookieValidity'] = 1800;
- Save the changes and close the file
- Connect to the server via SSH
-
Go to the file path
/usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/:# cd /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/
-
Create the file
config.inc.phpif it doesn't exist copying the template filelibraries/config.default.php:# if [ ! -f config.inc.php ]; then cp -a {libraries/config.default.php,config.inc.php}; fi
-
Edit the file
config.inc.phpwith a text editor:# vi config.inc.php
-
Change the value of the parameter
LoginCookieValidity:CONFIG_TEXT: $cfg['LoginCookieValidity'] = 1800;
- Save the changes and close the file
- Plesk for Windows:
- Connect to the server via RDP
- Go to the following folder path:
%plesk_dir%phpmyadmin\ - Create or edit the file
config.inc.phpwith a text editor -
Add or change the value of the parameter
LoginCookieValidityand save the changes:CONFIG_TEXT: <?php
declare(strict_types=1);
// ...
$cfg['LoginCookieValidity'] = 1800; - Edit the Plesk PHP.ini file
%plesk_dir%admin\conf\php.iniwith a text editor -
Add or edit the parameter
session.gc_maxlifetimein the[Session]section with the same value configured inLoginCookieValidityand save the changes:CONFIG_TEXT: ...
[Session]
session.gc_maxlifetime = 1800
... - Log out from phpMyAdmin and Plesk to start a new PHP session
- Connect to the server via RDP
- Go to the following folder path:
%plesk_dir%admin\htdocs\domains\databases\phpMyAdmin\ - Create or edit the file
config.inc.phpwith a text editor -
Add or change the value of the parameter
LoginCookieValidityand save the changes:CONFIG_TEXT: <?php
declare(strict_types=1);
// ...
$cfg['LoginCookieValidity'] = 1800; - Edit the Plesk PHP.ini file
%plesk_dir%admin\conf\php.iniwith a text editor -
Add or edit the parameter
session.gc_maxlifetimein the[Session]section with the same value configured inLoginCookieValidityand save the changes:CONFIG_TEXT: ...
[Session]
session.gc_maxlifetime = 1800
... - Log out from phpMyAdmin and Plesk to start a new PHP session
Comments
Please sign in to leave a comment.