[How to] Extend timeout session in phpmyadmin

Flickr image : bradmontgomery
     Lately, I was on assingment to prepare development-server for the project call 'hn' and it need requirement as list below

- php 5.4 with MySQL support
- phpmyadmin for administer database

     After setting up the host complete and my client using it for a while I got some complain about my server issue. The developer said the phpmyadmin session was too short for development so I decide to done some research about how phpmyadmin keeping it session. After hours, I realize that there are two part of configuration that relate to cookies session time first it is in the phpmyadmin configuration file where you can find at "/usr/share/phpmyadmin/config.inc.php" and you can change session time by adding this line

$cfg['Servers'][$i]['LoginCookieValidity'] = 43200;

     So I decide to change the LoginCookieValidity that set how long phpmyadmin session cookie will be available and I change to 43200 that a about 12 hours this likely could be done. But after restarted apache2 server and login to phpmyadmin I got the error message told me that

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.

     the problem explain above is clearly understand by default that the session.gc configuration need to have equal or more the LoginCookieValidity  So I change the php configuration file on "/etc/php5/cli/php.ini" like below and restart apache2 once the problem are gone.

session.gc_maxlifetime = 43200

reference:
http://www.ruifeio.com/2009/12/05/php-parameter-session-gc_maxlifetime-is-lower-that-cookie-validity-configured-in-phpmyadmin/

http://birdchan.com/home/2011/06/06/phpmyadmin-timeout-after-1440-seconds/

   

Comments

Anonymous said…
This comment has been removed by a blog administrator.