Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Ubuntu 10.04. And I want to upgraded my php version. When i am upgrading my PHP version(5.3.2 to 5.3.6) but After every updation Its show PHP version 5.3.2..

Edit:: I have checked "Ubuntu repository", PHP 5.3.6 is not avalable. :(

share|improve this question

migrated from Aug 13 '11 at 12:13

This question came from our site for professional and enthusiast programmers.

This is off-topic for Stack Overflow. Recommending it be moved to Server Fault. – Michael Irigoyen Jul 7 '11 at 20:32
up vote 5 down vote accepted

First add the following lines to the /etc/apt/sources.list.d/php5-ppa.list file using your favourite editor.

deb maverick main
deb-src maverick main

Then run the following command to add a key for the newly added repositories:

sudo apt-key adv --recv-keys --keyserver 00A6F0A3C300EE8C

After that you can update Ubuntu's software and upgrade PHP:

aptitude update
aptitude full-upgrade
share|improve this answer
I'm looking to upgrade my LTS Ubuntu 10.04 server for php > 5.3.2. 10.04 is called "lucid" where 10.10 is called "maverick". I noticed "maverick" is used in above example. Does this mean it's just pulling the PHP repo files from maverick? Will have be ok for lucid? – jmbertucci Sep 12 '12 at 16:36
Downvoted because the answer is no longer current. There are no php5 builds in the nginx PPA anymore (as far as I could see). – FvD Sep 16 '13 at 16:53
An up to date way to do this is to use ondrej's ppa, as stated below and as posted here… – FvD Sep 16 '13 at 16:59
I got these errors: W: Failed to fetch‌​ges.gz 404 Not Found and W: Failed to fetch 404 Not Found – Kostanos Sep 17 '13 at 21:31

I would recommend using my (Ondrej's) PPA, the answer taken from another Q&A thread: [How do I install PHP 5.4.0?

You could use a ppa to stay up-to-date with php. I use : Launchpad logo

It's now on 5.4. If you want use this ppa do this:

ppa:ondrej/php5 Launchpad logo (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
share|improve this answer

[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.

share|improve this answer
JFTR Brian Mercer's php5 PPA is outdated. – oerdnj Mar 7 '13 at 11:34
I tried this, and Brian Mercer's PPA throws a 404. – Mateng Jul 2 '13 at 14:31

Just found how to upgrade to 5.3.5, maybe it will help you:

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:fabianarias/php5
sudo apt-get update
sudo apt-get upgrade

Thanks to

$ php -v
PHP 5.3.5-1ubuntu7.2ppa1~lucid1 with Suhosin-Patch (cli) (built: May 25 2011 18:51:41) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
share|improve this answer

check this:

Kev, The part that says: use this repository:

deb stable all
deb-src stable all
share|improve this answer
Which part of this linked article answers the OP's question which is about upgrading his PHP installartion. – Kev Aug 13 '11 at 12:13

Unfortunately I believe you have to install PHP from source in order to get the latest version. You can get the file from, and essentially follow their installation guide from their manual.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.