Increasing the phpMyAdmin session timeout

When phpMyAdmin is installed, the default session timeout value is too low for many users, making your phpMyAdmin session expire too soon. One could argue that a low session timeout value is a good idea from a security perspective. If you do not think this is an issue, here are a few simple steps that’ll let you change how long phpMyAdmin will keep your session(s) alive.

Open config.inc.php in the phpMyAdmin “root” directory. Look for a line that contains this: $cfg[‘LoginCookieValidity’]. Set the value to the desired number of seconds you want the session to stay alive (3600 = one hour, which is reasonable for most users). If you do not have that line in your config.inc.php file, add it like this:

$cfg[‘LoginCookieValidity’] = 3600;

Don’t forget to save the file, and then login again to phpMyAdmin. You may need to close the browser and re-open your phpMyAdmin URL.

This also assumes that the PHP session garbage collection is set-up accordingly. This can be done in a number of ways:

  • php.ini; add a line (or change an existing) that contains session.gc_maxlifetime = <seconds>
  • Apache configuration; add a line to the appropriate <Directory> block that says “php_admin_value session.gc_maxlifetime <seconds>”
  • config.inc.php (phpMyAdmin); after the previously edited line, add a line with “ini_set(‘session.gc_maxlifetime’, <seconds>);”

The <seconds> above is the same value that you set your variable to in config.inc.php at the beginning of this post, “3600” (sans quotes) in my case. (Some of these methods may or may not work on the server you’re using.)

This isn’t the only way to circumvent phpMyAdmin sessions expiring on you in the middle of that important work; you can, of course, configure phpMyAdmin to have appropriate access directly, thus allowing you to access your MySQL database(s) without entering a username and a password. You’ll find more information about this on the phpMyAdmin website.

(phpMyAdmin is, IMHO, one of the best tools ever written in its class. My only gripe is that I’d really like to have a much less bloated visual display theme as the default, but you can accomplish this yourself quite easily.)

Opera 11, an awesome e-mail client

Quite a few people know about Opera, “the other browser”. For many years it has been lurking in the shadows of Firefox and others. Opera 11 may put an end to that, or at least shake things up a bit.

I’ve been using Opera since “I don’t know when”, on and off. Quite frequently, when I’ve tried it, I’ve been put off after a few minutes of trying to view fairly simple website that has failed to render properly in Opera.

I have never once in my years of “playing with Opera” actually checked out their e-mail client. I’ve either favored the awesome Ajax-enabled interface of Work2Go (an e-mail solution offered by my company, WebbPlatsen i Sverige AB), or turned to Mozilla’s Thunderbird or Evolution for an “aggregated view of my e-mail hell”.

A few hours ago, I decided to have a quick peek and see how Opera 11 would behave under Ubuntu 10.10 on my Lenovo X301 laptop.  If I had to sum it up in one sentence, it’d be something along the lines of “That’s pretty damn nice!”. Fortunately for you (?) and me (!), I have this blog where I can make my quick review a few words longer.

This is not a scientific review of Opera by any means. As I mentioned earlier, I’ve usually been put off from further testing Opera after it fails to render some fairly basic websites. Not so this time around. This means I kept it running long enough to think of testing the integrated e-mail client.

So I configured an IMAP account with our Work2Go service, and after having entered some account details, I was up and running with an e-mail client that easily matches Thunderbird on a “basic user experience” level. Many things “make sense”, which is something I really appreciate as a programmer. I often think thoughts like “It would be nice to have ‘this’ function here”, and I found ‘this’ function to actually be where I expected it to be quite a few times. Fascinating.

E-mail clients easily becomes a matter of principle, habit, and religion with their users. I’ve played with Eudora, Outlook, Live, theBat, Evolution, and a few that I’ve long since forgotten the name of, and now Opera 11. Each has its pros and cons, but Opera is definitely on to something here. While it won’t provide me with the total integration that I like in Work2Go (Documents, Calendar, synchronized address books, mobile sync with my HTC Wildfire, etc), I’d say I’ll keep this as an alternative.

But don’t take my word for it, try it out for yourself! And don’t go mistaking the full blown version of Opera 11 with Opera Mini available for many mobile and lightweight environments, they’re a world apart (or “fjord” as it might be).

Nice!