Skip to main content

Increase the phpMyAdmin Session Timeout

File under

phpMyAdmin is one of my favorite tools and I use it all the time. But man, the 30-minute session timeout is a huge PITA. A short cookie lifetime is all well and good on your production server, but what about when you’re just hacking away on the computer in your bedroom?

Did a little grepping and found that you can override this setting, even though it’s not documented anywhere but in teh codes (so far as I can tell). To override it, just open up in the root phpMyAdmin directory and add this setting (anywhere):

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

Where <your_new_timeout> is some number larger than 1800. Personally, I chose 28800, which is 8 hours.

Disclaimer! It should go without saying that increasing the timeout is a (comparatively minor) security risk (but a risk nonetheless). Obviously, do not do this on your production server. And as always, proceed with caution.

Thanks for a post - so have

Thanks for a post - so have bothered to enter anew again and again




very useful.

Thanks Man! I got crazy from

Thanks Man! I got crazy from this short session timeout

Thanks, I needed this

Just want to throw out that if you use phpMyAdmin on your production server you have bigger problems than a long session timeout :)

Ha ha ha! You said it!

Ha ha ha! You said it!

You also need to change php.ini

In order for this to take effect you also have to edit your Apache’s php.ini file (in Debian distros it is located at /etc/php5/apache2/php.ini) to the value of session.gc_maxlifetime. Then restart Apache.

Can't find

Where is the file you are talking about?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.