Wednesday, February 20, 2013

Key exchange for passwordless rsync, scp, ssh...

There are so many answers out there but this is probably the best one I've seen:
http://troy.jdmz.net/rsync

Wednesday, February 6, 2013

phpMyAdmin - Error

Don't you just love them errors? They make you stress your mind, check everything all over again, force to communicate with people around you and basically waste your time.

One such lovely error is:

Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.
There are quite a few answers online for fixing this problem but sometimes, especially if there's a chance you did something silly along the way, it just won't help.  So, yet another solution if everything else fails:

# chmod 0777 /var/lib/php/session

Monday, February 4, 2013

Apache cluster active server

So you have Apache running in a cluster and you want to know which server is active right now. PHP can help you there.

Put this line of code in whoami.php

<?php system('hostname', $retval); ?>