Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 stackoverflow.com 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
add comment

6 Answers 6

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 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
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 askubuntu.com/questions/109404/… –  FvD Sep 16 '13 at 16:59
    
I got these errors: W: Failed to fetch http://ppa.launchpad.net/nginx/php5/ubuntu/dists/maverick/main/binary-i386/Packa‌​ges.gz 404 Not Found and W: Failed to fetch http://ppa.launchpad.net/nginx/php5/ubuntu/dists/maverick/main/source/Sources.gz 404 Not Found –  Kostanos Sep 17 '13 at 21:31
add comment

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 :

https://launchpad.net/~ondrej/+archive/php5 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
add comment

[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
1  
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
add comment

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 http://blog.leenix.co.uk/2011/06/ubuntu-1004-lts-lucid-php-533-backport.html

$ 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
add comment

check this: http://www.omaroid.com/installing-lamp-with-php-5-3-6-on-ubuntu-11-04-natty-narwhal/

Kev, The part that says: use this repository:

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org 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
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

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.