1. Home
  2. Help Articles
  3. Increase timeout session in phpMyAdmin

Increase timeout session in phpMyAdmin


PhpMyAdmin is a free software tool which is designed to handle MySQL administration over the web. Since database entry is a time consuming affair, especially for large scale databases, the default timeout session provided by phpMyAdmin of 1440 seconds is not enough many of the times. This article will guide you the with the procedure to increase the timeout session in phpMyAdmin page.

Step 1: Locate config.inc.php file

If you have installed phpMyAdmin on to the server, then you will find the config.inc.php file in the path as mentioned below.

For CentOS, Fedora servers:

For Ubuntu, Debian servers:

Step 2 : Increasing the timeout value

Open the config.inc.php file and add the following anywhere in the file

$cfg['Servers'] [$i] ['LoginCookieValidity'] = <your_new_timeout>;

In the place of your_new_timeout, enter the required timeout session in multiples of 3600.

For example :

$cfg['Servers'] [$i] ['LoginCookieValidity'] = <3600*3>;

Then save the changes to the config.inc.php file. Login to the phpMyAdmin page and verify the changes made.

After login in, you might get the message error below:

Your PHP parameter session.gc_maxlifetime is lower that cookie validity configured in phpMyAdmin, because of this, your login will expire sooner than configured in phpMyAdmin.

To rectify this error:

Edit the php.ini configuration file depending on your linux server distibution:

  • Ubuntu  – /etc/php5 /apache2/php.ini
  • Centos  –  /etc/php.ini
  • Fedora –  /etc/php.ini
  • Debian – etc/php5/apache2/php.ini

You need to change the setting of session.gc_maxlifetime in php.ini to be greater than or equal to the value that you entered before which is 3600*3 in our example’s case.

Updated on November 26, 2016

Was this article helpful?

Related Articles

Add A Comment