Tuesday, 9 January 2018

How to Increase timeout session in phpMyAdmin

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:
/etc/phpMyAdmin/config.inc.php

For Ubuntu, Debian servers:
/etc/phpmyadmin/config.inc.php

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.

No comments:

Step-by-step OpenLDAP Installation and Configuration on server

This tutorial describes how to install and configure an OpenLDAP server and also an OpenLDAP client. Step by Step Installation and Conf...