PHP upgrades from 5.3.2 to 5.3.6
Solution 1:
First add the following lines to the /etc/apt/sources.list.d/php5-ppa.list
file using your favourite editor.
deb http://ppa.launchpad.net/nginx/php5/ubuntu maverick main
deb-src http://ppa.launchpad.net/nginx/php5/ubuntu maverick main
Then run the following command to add a key for the newly added repositories:
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 00A6F0A3C300EE8C
After that you can update Ubuntu's software and upgrade PHP:
aptitude update
aptitude full-upgrade
Solution 2:
I would recommend using my (Ondrej's) PPA, the answer taken from another Q&A thread: [How do I install different (upgrade or downgrade) PHP version in still supported Ubuntu release?
You could use a ppa to stay up-to-date with php. I use :
https://launchpad.net/~ondrej/+archive/php5
It's now on 5.4. If you want use this ppa do this:
ppa:ondrej/php5 (Click here for instructions on using PPAs.)
sudo add-apt-repository ppa:ondrej/php5
sudo apt-get update
sudo apt-get upgrade
If you don't have add-apt-repository binary do the following:
sudo apt-get install python-software-properties
Solution 3:
[Seems outdated]
I you want to upgrade Ubuntu 10.04 LTS to PHP 5.3.10, this is how I have done it:
sudo apt-get remove --purge php*
sudo apt-get autoremove
sudo apt-add-repository ppa:brianmercer/php5
sudo apt-get update
sudo apt-get install php5 libapache2-mod-php5 php5-cli php5-cgi php5-mysql php5-gd
sudo service apache2 restart
sudo pecl uninstall apc
sudo pecl install apc
Thanks to Brian Mercer for his PPA for php5.