Plesk

How to increase the timeout limit of a login session in phpMyAdmin

Question

How to increase or modify the timeout limit of a login session in phpMyAdmin?

Answer

For Plesk Obsidian 18.0.30 and above

  1. Connect to the server via SSH

  2. Go to the file path /usr/local/psa/phpMyAdmin/:

    # cd /usr/local/psa/phpMyAdmin/

  3. Create the file config.inc.php if it doesn't exist copying the template file libraries/config.default.php:

    # if [ ! -f config.inc.php ]; then cp -a {libraries/config.default.php,config.inc.php}; fi

  4. Edit the file config.inc.php with a text editor: 

    # vi config.inc.php

  5. Change the value of the parameter LoginCookieValidity:

    $cfg['LoginCookieValidity'] = 1800;

  6. Save the changes and close the file

For Plesk Onyx and Plesk Obsidian below 18.0.30

  1. Connect to the server via SSH

  2. Go to the file path /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/:

    # cd /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/

  3. Create the file config.inc.php if it doesn't exist copying the template file libraries/config.default.php:

    # if [ ! -f config.inc.php ]; then cp -a {libraries/config.default.php,config.inc.php}; fi

  4. Edit the file config.inc.php with a text editor: 

    # vi config.inc.php

  5. Change the value of the parameter LoginCookieValidity:

    $cfg['LoginCookieValidity'] = 1800;

  6. Save the changes and close the file

 

For Plesk Obsidian 18.0.30 and above

  1. Connect to the server via RDP

  2. Go to the following folder path: %plesk_dir%phpmyadmin

  3. Create or edit the file config.inc.php with a text editor

  4. Add or change the value of the parameter LoginCookieValidity and save the changes:

    <?php
    declare(strict_types=1);
    // ...
    $cfg['LoginCookieValidity'] = 1800;

  5. Edit the Plesk PHP.ini file %plesk_dir%adminconfphp.ini with a text editor

  6. Add or edit the parameter session.gc_maxlifetime in the [Session] section with the same value configured in LoginCookieValidity and save the changes:

    ...
    [Session]
    session.gc_maxlifetime = 1800
    ...

  7. Log out from phpMyAdmin and Plesk to start a new PHP session

For Plesk Onyx and Plesk Obsidian below 18.0.30

  1. Connect to the server via RDP

  2. Go to the following folder path: %plesk_dir%adminhtdocsdomainsdatabasesphpMyAdmin

  3. Create or edit the file config.inc.php with a text editor

  4. Add or change the value of the parameter LoginCookieValidity and save the changes:

    <?php
    declare(strict_types=1);
    // ...
    $cfg['LoginCookieValidity'] = 1800;

  5. Edit the Plesk PHP.ini file %plesk_dir%adminconfphp.ini with a text editor

  6. Add or edit the parameter session.gc_maxlifetime in the [Session] section with the same value configured in LoginCookieValidity and save the changes:

    ...
    [Session]
    session.gc_maxlifetime = 1800
    ...

  7. Log out from phpMyAdmin and Plesk to start a new PHP session