Brady J. Frey

Search bradyjfrey.com
Search my site

Upgrade to PHP 5 on a Media Temple (dv) Dedicated Virtual Server

Full Article:

For those of you frustrated on your aged PHP for Media Temple DV, they’ve recently released a step-by-step rpm install for PHP 5 on your server. While this worked in installing PHP without a hitch (I already upgraded to mysql 4+, but feel free too in these directions), I had an issue where PHP 5 could no longer find MySQL on my server. After initial anxiety, launching a phpinfo() test page yielded that the modules for PHP were pointed at:

/usr/lib/php4

Whoops – but easy fix. Log in as root, and open up /etc/php.ini – on line 428 (atleast for me) you’ll see:

extension_dir = /usr/lib/php4

Change that line to the new location of those PHP 5 modules, which is:

extension_dir = /usr/lib/php/modules

And viola, PHP 5 running nice and happy.

Similar Posts

Published

4 Reader Comments::
  1. 1 Mark says:

    Thanks for this! I panicked a bit when my database went missing. I thought something had gone wrong the mysql update.

    Why the instructions don’t just say ‘edit your php.ini’ instead of running Perl to ‘fix your php.ini’ tsk.

    Anyway up a running now.

  2. 2 Brady J. Frey says:

    I know, the first time I did it was late at night for a smooth upgrade, and came close to a heart attack! I emailed MT and asked them to update the article to reflect this change, but they never did, so I thought it a necessity to show it somewhere. Glad to hear it helped and you’re up and running:)

  3. 3 marty says:

    i was able to get the main domain to work, but any sub-domains just won’t cooperate. any idea on how to get subdomains to work?

  4. 4 Brady J. Frey says:

    Hmmm, I didn’t have this problem on my DV (dedicated virtual) server – I know their GS (the grid server version) can be manged either in the GUI they create or you create a .htaccess file in the ‘html’ folder of that domain and add:
    AddHandler php5-script .php

    If you have PHP live on one domain in DV, it should propogate to all domains so long as their on the same server. Are you sure you have it running on apache? Create a http://www.htmlite.com/php003.php for testing on one of your domains, or you might have to cite me some log files.

Your thoughts:
Tell us what you think: