I use phpmyadmin to create mysql database. And I have set the auth type to cookie in the config.inc.php. How do I change the time limit so that even if I logged in I stayed idle for hours it won't require me to log in again.
The configuration files are located in the /etc/phpmyadmin directory. The main configuration file is /etc/phpmyadmin/config. inc. php, which contains the configuration options that apply globally to phpMyAdmin.
Look for : $cfg['ExecTimeLimit'] = 600; You can change '600' to any higher value, like '6000'. Maximum execution time in seconds is (0 for no limit). This will fix your error.
I know this question is getting old, but the above 'selected' answer doesn't actually work. That just sets the time til session data gets removed.
After trying this and realizing it was failing, I spent some time reading through the phpmyadmin docs and found this:
$cfg['LoginCookieValidity'] = 86400;
$cfg['LoginCookieStore'] = 0;
The first line is the amount of time until you're auto-logged out. These values need to be set in your phpmyadmin install folder, within the file config.inc.php
.
They were not there at all in my file but after adding them to the bottom it worked correctly. The first variable defines how long until you are logged out in seconds - I set mine to 1 day. The second variable is how long the cookie lasts. 0 means the cookie lasts til you close your browser.
Setting up these two variables will have the desired effect. You could set both to some insane number and never log in, but that would be pretty insecure.
Fast solution for Ubuntu:
// edit php.ini
and look for session.gc_maxlifetime
sudo vi /etc/php5/apache2/php.ini
// set to 24 hours
session.gc_maxlifetime = 86400
// edit config.inc.php
and look for $cfg['LoginCookieValidity']
sudo vi /etc/phpmyadmin/config.inc.php
// set to 24 hours
$cfg['LoginCookieValidity'] = 86400;
// restart web server
sudo service apache2 restart
In my case(4.3.8) just replace in config.inc.php
cookie
to config
and add 2 lines like bellow:
/*
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['username'] = 'root'; //add this line
$cfg['Servers'][$i]['password'] = 'root'; //add this line
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With