I know this question has been asked many times on SO website. However, I have read this, this, this, this, this and this, and more. None of them worked. I have also tried to change the session files location and other things I don't remember now.
My setup:
one: the config.inc.php
file:
<?php
$cfg['LoginCookieValidity'] = 3600 * 24; // http://docs.phpmyadmin.net/en/latest/config.html#cfg_LoginCookieValidity
this shows up in phpMyAdmin settings:
two: .htaccess
file:
php_value session.gc_maxlifetime 86400
three: phpinfo.php
file from phpMyAdmin root shows:
four: the server (uname -a):
Linux ubuntu-13 3.11.0-26-generic #45-Ubuntu SMP Tue Jul 15 04:02:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Is there any other way I can increase the phpMyAdmin session timeout?
Ubuntu will by default disable the PHP session garbage collector (by setting the master value of
session.gc_probability
to0
), and in stead use a cronjob to delete session files after they reach a certain age. The age is determined by the master value ofsession.gc_maxlifetime
.This means that regardless of your local 86400 seconds value (which has no effect because of the disabled session garbage collection) the cronjob will delete sessions files after 1440 seconds.
So you have 2 options:
Disable the cronjob (probably
/etc/cron.d/php5
) and enable the PHP session garbage collector, by settingsession.gc_probability
to1
(in all/etc/php5/*/php.ini
files).Set the correct master value for
session.gc_maxlifetime
. Yours is 1440 seconds. Alter it (in all/etc/php5/*/php.ini
files) to the greatest local value any virtual host / php application on the server uses (so at least 86400 seconds).