Tell me more ×
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
This is off-topic for Stack Overflow. Recommending it be moved to Server Fault. – Michael Irigoyen Jul 7 '11 at 20:32

migrated from stackoverflow.com Aug 13 '11 at 12:13

5 Answers

up vote 6 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

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 at 11:34

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

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

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

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.