I have just installed a 10.04 LTS on my development server but the system that I need to run on it (Magento ecommerce) is not compatible with PHP 5.3 which ships with the newest version of Ubuntu. Is there a safe and upgrade-proof way of getting PHP 5.2 installed or will it be easier to use an older version of Ubuntu?
You can use my ppa, that I have created for this purpose. Please take notice of the pinning that is necessary. Also, aptitude will not recognize the pinning. You must use the aptitude specific method if you want to use it.
Note - this is for 10.04 (lucid) only
It is possible to use karmic packages and pin them with aptitude. This can be done by using this commands:
Got this from link text
There's a great blog post about this at http://civicactions.com/blog/2010/may/26/ubuntu_1004_and_drupal?page=1#comment-3717
I've recently tried to solve the same problem myself. Instead of making changes to the package management I compiled PHP 5.2.17 from the source code myself and then used the program Checkinstall to install the new .deb package on my system.
I wrote up the steps in a blog post, Compiling PHP 5.2 for Ubuntu 10.10, but the steps basically involved the following:
my configure command looked like this:
And that was it. I had already installed Apache2 using Synaptic (you need to use the apache2-mpm-prefork package for use with PHP). Also if you had any PHP5 pacakges already installed you would need to uninstall them before trying to install your own compiled package.
Compiling the package yourself really doesn't take long at all and is a good experience if you haven't done it already on your Ubuntu machine.