How to increase session time in phpMyAdmin in Ubuntu?

2

When I'm developing a system, I usually leave my% open%.

Then, as time passes, the following message appears:

How can I configure my phpmyadmin so that I can increase this session time (or remove it)?

    
asked by anonymous 09.07.2015 / 16:05

2 answers

3

If it will only be used in local development, I recommend not using authentication to make it easier

To do this go to the folder of phpmyadmin for example /var/www/phpmyadmin or /etc/phpmyadmin/config.inc.php and look for the config.inc.php file.

If you can not find the folder, you can try the following command at (maybe it's linux - source: ubuntuforums ):

locate phpmyadmin

And modify the lines to something like:

$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

Note that the line allows you to log in without authentication:

$cfg['Servers'][$i]['AllowNoPassword'] = true;

You must set the login and password of the desired user (usually root):

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';

phpMyAdmin version 4.4 +

As of version 4.4 (stable version) the configuration variables have changed a little:

/* Define o tipo de autenticacao */
$cfg['Servers'][$i]['auth_type'] = 'config';

/* parametros do servidor */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;

/* dados do banco e do usuario que ira manipular os dados */
$cfg['Servers'][$i]['controlhost'] = 'localhost';
$cfg['Servers'][$i]['controlport'] = '3306';
$cfg['Servers'][$i]['controluser'] = 'root'; //usario do banco
$cfg['Servers'][$i]['controlpass'] = ''; //senha do banco
  

Note: This way the session will not expire and you will not even need to authenticate (do not use this in the production environment)

    
09.07.2015 / 16:15
3

Oops! It seems that the solution was already in the%% of%:)

See the image:

Ijustneedtochangethevalueof"Login validity cookie" to a larger number.

    
09.07.2015 / 16:29