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.

2 Responses to “Media Temple and PHP5 cooking tips…”

  1. admin Says:

    Media Temple very kindly sent us an email pointing out that their new range of DV servers will be PHP5 as standard – which is great news!

    “Handy lil’ write up; nice work Alex!!

    Not sure if you heard, and feel free to add it to your post, but PHP 5 (+ MySQL 5 & Centos 5) now come standard with our recent (dv) update:

    Thanks for helping out others and look for our new (mt) forums where you can contribute and meet fellow (mt)’ers. Hope to see you in there when it goes live.


    Alex Capehart
    Director of Marketing
    (mt) Media Temple, Inc
    (office direct) 310-841-5562
    (24/7 toll-free) 877-578-4000

  2. Alex Judd Says:

    On a recent update to this – I also had to install the following libraries with yum

    yum install libjpg-devel
    yum install libpng-devel
    yum install freetype-devel


Leave a Reply