phpmyadmin logs out after 1440 secs

后端 未结 24 1286
予麋鹿
予麋鹿 2021-01-29 23:29

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

相关标签:
24条回答
  • 2021-01-29 23:38

    ===method 1 with http login===

    [php.ini]
    session.gc_maxlifetime = 86400
    
    [config.inc.php]
    
    $cfg['Servers'][$i]['auth_type']     = 'http';
    

    ===method 2 with cookie login===

    [php.ini]
    
    session.gc_maxlifetime = 86400
    
    [config.inc.php]
    
    $cfg['Servers'][$i]['auth_type']     = 'cookie';
    
    $cfg['Servers'][$i]['LoginCookieValidity'] = 86400;
    
    $cfg['Servers'][$i]['pmadb']         = 'phpmyadmin';
    
    $cfg['Servers'][$i]['controluser']   = 'phpmyadmin_pma';
    
    $cfg['Servers'][$i]['controlpass']   = 'nigookike';
    
    $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; // there's a lot of other table required for full functionality,
                                                                             // all others can be left out unconfig except this one
    
    [mysql]
    -import phpMyAdmin/sql/create_tables.sql
    
    -grant PRIVILEGES to phpmyadmin_pma as below
    
    db/table
    
    phpmyadmin  ALL PRIVILEGES 
    
    mysql/db    SELECT
    
    mysql/host  SELECT
    
    mysql/tables_priv   USAGE
    
    mysql/user  USAGE
    
    
    -clear all entries should old one exists
    
    phpmyadmin/pma__userconfig
    
    [webUI]
    
    -clear broswer cookie
    
    -as normal mysql user, access http://mysql/phpmyadmin , at the bottom of page:
    
        The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. [Find out why.]
    
    -near top of the page
    
        [Create missing phpMyAdmin configuration storage tables.]
    
    -access http://mysql/phpmyadmin > settings > features > Login cookie validity > 86400 > [apply]
    
    -check phpmyadmin/pma__userconfig contain new entries of aforemention mysql user
    

    N.B.

    1. every user has independent setting and [webUI] procedure has to be repeated for each user

    2. if "The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. [Find out why.]"

    link does not appears on frontpage, go settings > features > warnings > Missing phpMyAdmin configuration storage tables > [refresh] a few times will make it appears

    0 讨论(0)
  • 2021-01-29 23:40

    drive here your wamp installed then go to wamp then apps then your phpmyadmin version folder then go to libraries then edit config.default.php file e.g

    E:\wamp\apps\phpmyadmin4.6.4\libraries\config.default.php

    here you have to change

    $cfg['LoginCookieRecall'] = true;

    to

    $cfg['LoginCookieRecall'] = false;

    also you can change time of cookie instead to disable cookie recall

    $cfg['LoginCookieValidity'] = 1440;

    to

    $cfg['LoginCookieValidity'] = anthing grater then 1440 
    

    mine is

     $cfg['LoginCookieValidity'] = 199000;
    

    after changing restart your server

    also there is another method but it reset when ever we restart our wamp server and here is that method also

    login to your phpmyadmin dashbord then go to setting then click on features and in general tab you will see Login cookie validity put anything greater then 14400 but this is valid until next restart of your server.

    0 讨论(0)
  • 2021-01-29 23:41

    We can change the cookie time session feature at:

    Settings->Features->General->Login cookie validity

    I found the answer in here.. No activity within 1440 seconds; please log in again

    EDIT:

    This solution will work only for the current session, to change permanently do:

    open config.inc.php in the root phpMyAdmin directory .

    wamp folder: wamp\apps\phpmyadmin{version}\config.inc.php

    ubuntu: /etc/phpmyadmin

    add this line

    $cfg['LoginCookieValidity'] = <your_timeout>;
    

    Example

    $cfg['LoginCookieValidity'] = '144000';
    
    0 讨论(0)
  • 2021-01-29 23:43

    It worked for me after I

    • changed the $cfg['LoginCookieValidity'] in (phpmyadmin folder)/libraries/config.default.php to 999999999.

    • checked the php.ini used by the phpmyadmin by php5 -i | grep php.ini.

    • went to the php.ini file whose path I got from the grep command output and changed the session.gc_maxlifetime value to 999999999.

    • restarted the server. In my case it was sudo service apache2 restart.

    Done. Logged in phpmyadmin and checked the cookie validity in Settings -> Features -> General -> Login cookie validity. It was 999999999. Also there was no warning "Your PHP parameter session.gc_maxlifetime is lower that cookie validity ...". The warning showed after I logged in phpmyadmin before I changed the php.ini file.

    Check the version of php used by the phpmyadmin. You should change the ini file of the php that is used by the phpmyadmin. I have php5 and php(i.e 7) both installed. But my phpmyadmin uses php5. So I had to search for ini file of php5.

    0 讨论(0)
  • 2021-01-29 23:44

    Steps for doing this using phpMyAdmin settings without any problem or requirements to change configs in php my.ini or defining .htaccess file:

    1. Goto your phpMyAdmin install path (ex. /usr/share/phpMyAdmin/ on my centos7) and find create_tables.sql in one of its subfolders (phpMyAdmin/sql/create_tables.sql in my 4.4.9 version.) and execute whole file contents on your current phpMyAdmin site from your web browser. This will create a database named phpmyadmin which can keep all your phpMyAdmin options saved permanently.
    2. In phpMyAdmin's config.inc.php (located on /etc/phpMyAdmin/ in my centos7 server) find the commented line $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; and uncomment it (Now phpMyAdmin will use that custom database we generated in previous step).
    3. Goto phpMyAdmin from web browser and goto Server >> Settings >> Features >> "Login Cookie Validity" as in picture described by Pavnish and set the desired value. It works now.

    References: Niccolas Answer ,PhpMyAdmin Configuration Storage, flashMarks Answer

    0 讨论(0)
  • 2021-01-29 23:45

    1) Login to phpMyAdmin 2) From the home screen click on "More settings" (middle bottom of screen for me) 3) Click the "Features" tab/button towards the top of the screen. 4) For 20 days set the "Login cookie validity" setting to 1728000 5) Apply.

    php xampp

    0 讨论(0)
提交回复
热议问题