How to change time limit in phpmyadmin (logging in)

后端 未结 6 1347
走了就别回头了
走了就别回头了 2021-01-04 03:11

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

6条回答
  •  旧时难觅i
    2021-01-04 03:33

    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.

提交回复
热议问题