How to Increase PhpMyAdmin Session Timeout from 1440 seconds


phpMyAdmin is one of my favorite tools and I use it all the time. But man, the 24-minute session timeout is a huge problem . A short cookie lifetime is all well and good on your production server, but what about when you’re just testing new things  away on the computer in your test envirnment?
Did a little grepping and found that you can override this setting, even though it’s not documented anywhere but in the codes (so far as I can tell). To override it, just open up config.inc.php in the root phpMyAdmin directory and add this setting (anywhere, but  mostly at end of file):
phpmyadmin config file for ubuntu Server : /etc/phpmyadmin/config.inc.php

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

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

Define how long a login cookie is valid. Please note that php configuration option session.gc_maxlifetime might limit session validity and if the session is lost, the login cookie is also invalidated. So it is a good idea to set session.gc_maxlifetime at least to the same value of $cfg['LoginCookieValidity'].
php.ini file for ubuntu Server : /etc/php5/apache2/php.ini

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.

Setting up a SVN Server on a EC2 Instance (Ubuntu 14.04 LTS)

Setting up an SVN server on my EC2 instance (on AWS), is a major problem whenever we connect svn using key-file(key.pem for AWS).
Here’s my situation:
  • I have a micro EC2 instance hosted with Amazon.
  • I used a non-standard port for ssh access
  • I have a pem file provided by Amazon for access through ssh
  • I run Ubuntu 14.04 Server on my EC2 instance
  • On the client side, I’m running Ububtu 14.04 Desktop
With that out of the way, the first thing I had to do was insure svn was installed on my server and Desktop :
sudo apt-get install -y subversion

Then, on my EC2 instance, I want to create both the directory where I’ll store repositories, and the subsequently, create the repository itself. Permissions and ownership are of the utmost importance. This worked for me:
sudo mkdir -p /srv/svn/
sudo chown ubuntu:ubuntu /srv/svn/
svnadmin create /srv/svn/{repo_name}
Mind the {rep_name} placeholder above 

vim /svnrepos/conf/svnserve.conf
In that file add these three lines:
anon-access = none
auth-access = write
password-db = passwd
Create a password file:
vi /svnrepos/conf/passwd
In that file add a line for your user:
# add users in the format : user = password
tony = mypassword