Articles

Increase phpMyAdmin Session Timeout To More Than 1440 Seconds

If you work with phpMyAdmin, you may have come across a nasty message that says: “No activity within 1440 seconds; please log in again”. This message is shown because phpMyAdmin has a session timeout time limit of 1440 seconds i.e. 24 minutes. So if you are away from your desk for at least 24 minutes and you come back to access phpMyAdmin, you will have to relogin. This could be irritating. In this article, I am going to share an easy way to increase this session timeout time limit to any value you like. Follow along for more info.

How To Increase Session Timeout To More Than 1440 Seconds in phpMyAdmin

I am using WAMP server, so the steps listed below show you how to make this change if you are using Wamp Server.

1. Navigate to the folder where phpMyAdmin is installed. Typically, it would be something like: C:/wamp/apps/phpmyadmin{…version number…}

2. Open config.inc.php. Scroll down to the bottom of the file and just below the ?> tag, add the following line & save:

$cfg['LoginCookieValidity'] = 86400; // In seconds

That’s it! That’s all you need to do in order to increase session timeout time. 86400 seconds equals 24 hours, so you are good to go for one full day at a stretch. If you would like to increase this limit to any other value, then simply use the following formula:

60 * 60 * Number of hours.

So for example, if you would like to increase the session timeout limit to 12 hours, then you would get the value in seconds as:

60 (seconds) * 60 (minutes) * 12 (hours) = 43200 seconds

If you would like to increase session time out to just 5 hours, you can get the number of seconds like so:

60 * 60 * 5 = 18000 seconds

Simply replace the 86400 in the above line of code with the seconds that you receive as a result of the above multiplication and you will be good to go.

ADDITIONAL NOTE:

On some systems such as Debian, it might be mandatory to make a relevant change in your WAMP’s php.ini file. So if the above method does not work, open up the php.ini file of your server and hunt for the variable “session.gc_maxlifetime” and assign it the same value as above. So in my case, as I have increased the value to 86400, I would update the variable in my php.ini file like so:

session.gc_maxlifetime = 86400

Simply update the session.gc_maxlifetime in your php.ini file to any value you desire (note that it should match with the value that you add to config.inc.php file). Once done, make sure that you restart your server and that should do it.

Your Turn!

What do you think of the above way to increase the phpMyAdmin Timeout limit? Did it help fix the issue? Feel free to let us know by commenting below.

Share your thoughts, comment below now!

*

*