Install and Upgarde php5.3 on Ubuntu 9.10

Below is a quick step to install PHP 5.3.1 on Ubuntu 9.10 using apt-get.

You need to add sources list from the  Dotdeb Debian "Lenny" repositories.They are perfectly compatible with Ubtuntu 9.10 and require the manual installation of two extra dependencies which Ubuntu cannot resolve itself.

Step 1: Add the Dotdeb repos to your Ubuntu package sources list.
sudo emacs /etc/apt/sources.list
Add the following entries:
# PHP 5.3 Dotdeb Sources
deb http://php53.dotdeb.org stable all
deb-src http://php53.dotdeb.org stable all

Step 2 :This will allow you to update to PHP 5.3.1 but we also need to resolve two other minor issues or we will get a lot of errors and a possibly messed up PHP system. PHP 5.3 requires two additional libraries, libicu and libkrb, which Ubuntu will not resolve properly. So we should install them manually. You should download the relevant debs for your system, here I use the i386 variants. You can substitute "amd64" for "i386" if you run a 64 bit system.

http://us.archive.ubuntu.com/ubuntu/pool/main/k/
krb5/libkrb53_1.6.dfsg.4~beta1-5ubuntu2_i386.deb

http://us.archive.ubuntu.com/ubuntu/pool/main
/i/icu/libicu38_3.8-6ubuntu0.2_i386.deb

Now as our new sources contain the PHP 53 sources, we can just go with

Step 3 :

sudo aptitude update
sudo aptitude safe-upgrade

Through terminal..
You will be warned about installing unauthenticated packages since these are not Ubuntu sourced. Once you've confirmed this, the relevant PHP packages will be downloaded including, of course, the updated Apache 2 mods.

Refrence : [b]http://tinyurl.com/395j66w[/b]