Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change time limit in phpmyadmin (logging in)

Tags:

phpmyadmin

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.

like image 444
user225269 Avatar asked May 06 '10 07:05

user225269


People also ask

How do I change phpMyAdmin settings?

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.

How can we increase maximum execution time of 60 seconds exceeded in xampp?

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.


3 Answers

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.

like image 168
Erik Avatar answered Oct 25 '22 14:10

Erik


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

like image 36
Igor Parra Avatar answered Oct 25 '22 15:10

Igor Parra


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
like image 28
croonx Avatar answered Oct 25 '22 14:10

croonx