Wednesday, March 26th 2008

Media Temple and PHP5 cooking tips…
posted @ 12:05 pm in [ Apache -PHP -Technology -Web Design ]

I know I know, nobody really wants to run PHP5 on their Media Temple Dedicated Server when PHP4 works just fine – well actually yes we did as one of our team is becoming a dab hand at writing PHP5 dependant classes and then having to find servers to run them.

Media Temple provide their own link on how to upgrade the system ( however this was having none of it for us so here’s a quick heads-up on how to do it our way.

1. Install YUM

There’s a few great articles on how to do this on the web (Google for CentOS and YUM) but the trick is to remember when you have it installed is that the packages missing from the central CentOS distribution can still be accessed with YUM you just need to use CentOSPlus.

yum --enablerepo=centosplus install <your package name>

2. Roll your own PHP 5

Download the latest PHP tar ball, unpack and start configuring. Here’s our config file which will help you build in all the dependencies that Media Temple has (zend, mysql, zlib etc.) – you will need to use YUM to get various packages and libraries, and some have to be located on the source websites, but here’s a hints to help.

– installing mcrypt


 rpmbuild -ta libmcrypt-2.5.7.tar.gz

 rpm -ivh /usr/src/redhat/RPMS/i386/libmcrypt-2.5.7-1.i386.rpm /usr/src/redhat/RPMS/i386/libmcrypt-devel-2.5.7-1.i386.rpm

 yum --enablerepo=centosplus install php-mcrypt

– installing mhash


 bunzip2 mhash-0.9.9.tar.bz2

 tar xvf mhash-0.9.9.tar

 cd mhash-0.9.9


 make install

– configuring php5
























































Restart your PSA system (

/usr/local/psa/admin/sbin/websrvmng -a -v

) and you should be cooking on a lovely PHP 5 install with everything else still as it was.

Wednesday, March 12th 2008

Recursive ftp with wget
posted @ 10:49 am in [ Apache -PHP -Technology -Web Design ]

Sometimes when the servers won’t give you ssh access, and you want to copy files from one machine where you don’t have ssh access to one that does, recursive ftp with wget is the answer

wget -r ftp://username:[email protected]/directory

For example to get all the files from my server at with username fish and password cakes, in my homedirectory I would use

wget -r ftp://fish:[email protected]/~/*

Prolem solved…