In my local development Ubuntu box I use MySQL and phpmyadmin to work with the database.
Whenever phpmyadmin is idle for 1440 secs (24min) the session expires. I lose m
You should restart apache or httpd, not mysqld
sudo service httpd restart
or
sudo /etc/init.d/apache2 restart
If the parameter $cfg['LoginCookieValidity']
is not taking effect in config.inc.php
file,
try disabling the session.gc_maxlifetime
in the php.ini file by putting a semicolon to the left like this:
; After this number of seconds, stored data will be seen as 'garbage' and
; cleaned up by the garbage collection process.
; http://php.net/session.gc-maxlifetime
; session.gc_maxlifetime = 1440
Or try disabling both $cfg['LoginCookieValidity']
and session.gc_maxlifetime = 1440
by commenting both out.
Then phpMyAdmin should no longer log out when you idle. It works for me on Windows. Don't forget to clear your browser cache and restart your webserver.
If you have phpmyadmin configuration storage setup, the settings will be pulled out of your phpmyadmin.pma__userconfig table, and will override anything you have in config.inc.php. In this table, each MYSQL user can be assigned a different set of phpmyadmin settings.
To set permanently cookie you need to follow some steps
Goto->/etc/phpmyadmin/config.inc.php
file
add this code
$cfg['LoginCookieValidity'] = <cookie expiration time in seconds >
steps to change cookie expiration
step 1:Go to settings of Phpmyadmin
step 2:General
step 3:Login cookie validity
step 4:Update 1440 seconds default cookie expiration time with your new value
You can change the cookie time session feature at phpmyadmin web interface
Settings->Features->General->Login cookie validity
OR
If you want to change the 'login cookie validity' in configuration file, then open the phpmMyAdmin configuration file, config.inc.php
in the root directory of PHPMyAdmin.(root directory is usually /etc/phpmyadmin/)
After locating the config.inc.php , search for the line below and set it to the value of seconds you want phpmyadmin to timeout:
$cfg['LoginCookieValidity']
or
Add the following:
$cfg[ ' Servers'] [$i] [ ' LoginCookieValidity' ] = <your_new_timeout>;
For example:
$cfg[ ' Servers'] [$i] [ ' LoginCookieValidity' ] = <3600 * 3 >;
The Timeout is set to 3 Hours from the Example above.
session.gc_maxlifetime
might limit session validity and if the session is lost, the login cookie is also invalidated. So, we may need to set the session.gc_maxlifetime in php.ini
configuration file(file location is /etc/php5 /apache2/php.ini in ubuntu).
session.gc_maxlifetime = 3600 * 3
$cfg['LoginCookieValidity']
Type: integer [number of seconds]
Default value: 1440
Define how long a login cookie is valid. Please note that php configuration option session.gc_maxlifetime might limit session validity and if the session is lost, the login cookie is also invalidated. So it is a good idea to set session.gc_maxlifetime at least to the same value of $cfg['LoginCookieValidity'].
NOTE:
PHP Fatal
error: Call to a member function get() on a non-object in
/path/to/phpmyadmin/libraries/Header.class.php
on line 135, then do
a chmod 644 config.inc.php
. that should take care of the error.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.
. then change the session.gc_maxlifetime
as mentioned above.