No activity within 1800 seconds; please log in again

1800 seconds is such a long time, right?

  1. It’s 30 minutes.
  2. It’s 0.5 hours.
  3. It’s 0.0208333333 days.
  4. It’s also 5.70397764 × 10-5 years.

And it’s not long enough for me. phpMyAdmin logs you out after 1800 seconds, obviously for security reasons. That’s fine if there are other people about, if I was in an office with people coming and going, but I work from home. All I see for most of the day is my family, the radio, my messy desk, computers, and the view out the window. Time to figure out how to make that 1800 second limit a little longer or remove it altogether.

After a little digging, I discovered that extending the time limit to a day is actually quite easy. Open your phpMyAdmin’s config.inc.php and search for or add the following line:

$cfg['LoginCookieValidity'] = 86400;

Refresh your logged out phpMyAdmin and presuming you haven’t left it idle for 24 hours, you’ll be logged in again!

If the time limit really bugs you, you need http authentication. Look for the “auth_type” line in the config.inc.php and change that to “http”. phpMyAdmin won’t log you out as long as your browser is open. Perfect!

If you’re concerned about sending your MySQL username and password in the clear each time you make a request to phpMyAdmin you can either use SSL or try the “config” auth_type. Make sure you fill in the username and password fields in the config file, and secure the phpMyAdmin directory with a htpasswd file.


You might also like

If you like this post then please subscribe to my full RSS feed. You can also click here to subscribe by email. There are also my fabulous photos to explore too!

"No activity within 1800 seconds; please log in again", 5 out of 5 based on 1 ratings.

Published by

Donncha

Donncha Ó Caoimh is a software developer at Automattic and WordPress plugin developer. He posts photos at In Photos and can also be found on Google+ and Twitter.

23 thoughts on “No activity within 1800 seconds; please log in again”


  1. I changed the config.inc.php file as laid out above, but it still logs me out when I least expect it. The only difference it made was that it no longer gives the reason as being that I was inactive for 1800 seconds. It gives no reason at all. There must be some other setting somewhere that also sets a time limit.


  2. Great tip, but it seems to be working only on some systems. On my Linux machine it seems to be working, but on my Windows Server 2003 it is not working.


  3. Sorry, it is working anyway also on Windows Server 2003, I had been adjusting the time settings to 1 year ahead because I was testing some other script. Of course, phpMyAdmin throws me off.
    Stooopid me!! Thanks for the tip once again!


  4. I found you need to clear the relevant cookies too, and make sure you go to the site fresh (without any ?token=B6D5BC… junk on the end)


  5. Thanks so much, I swear it feels like I have logged in over a hundred times today, nothing more annoying than practicing your password typing skills every 30 minutes to reference table structures.


  6. clear your browser cache including cookies and you will find that you are not hampered with this problem and don’t have to make modifications to your config file


  7. hello Jake. I also use XAMPP, so to change this you must do it in two places:

    \phpmyadmin\libraries\config.default.php

    change LoginCookieValidity from 1440 to …let say … 86400

    and do the same at

    php\php.ini

    with session.gc_maxlifetime variable … as Dallas said


  8. Found this error while browsing databases on GoDaddy. I had not been inactive for more than a few seconds. It may be a generic ‘catch all’ / “we’d rather not tell you what the problem is” error message. Be aware that management are always keen to subvert error messages such that their organization doesn’t look so bad when they occur, at the absolute pain of the end user who gets bogus diagnostics instead of anything remotely useful.

Leave a Reply