12

I'm new to Linux and have only the basic experience with Ubuntu and installing LAMP Server. I've successfully installed all using the "apt-get install" method. My problem is I want to update PHP 5.3.2 to PHP 5.3.10. It is possible to do that? TIA!

4 Answers 4

13

For anyone who wants 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 add-apt-repository ppa:l-mierzwa/lucid-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  

It looks a bit drastic using sudo apt-get remove --purge php* but Ubuntu does proceed to list a load of files that get filtered but then ignored and I have successfully upgraded 3 times so far.

Good Luck and thanks to Brian Mercer for his php5 PPA.

[Update 2014-11-05]

From Ondřej Surý's launchpad site:

  • PHP 5.4 : ppa:ondrej/php5-oldstable
  • PHP 5.5 : ppa:ondrej/php5
  • PHP 5.6 : ppa:ondrej/php5-5.6
1
  • Update, this PPA/repo seems to have been taken down? Oct 25, 2013 at 14:05
5

jrsalunga, you can try pulling in the 5.3.10 packages from precise (just updated last week), though it may not compile without modification:

apt-get install ubuntu-dev-tools
pull-lp-source php5 precise
dpkg-source -x php5_5.3.10-*.dsc
apt-get build-dep php5
cd php5-5.3.10
debuild binary

This will take a long time, and may fail because of all of the changes between 10.04 and 12.04. However, if it succeeds, the .debs produced should be fully installable on 10.04.

4
  • While nice in theory, this won't work because php-5.3-10 depends on Mysql 5.5.
    – Berdir
    Mar 6, 2012 at 8:50
  • Well you can also backport mysql-5.5 to 10.04 of course. :) But if you don't want to do that, you can very easily change the build dependency on 5.5 back to 5.1 and it will work. The only reason for that build-dep is to run the test suite with mysqld running.
    – SpamapS
    Mar 11, 2012 at 15:34
  • I installed mysql-5.5 using Jay's method here: superuser.com/questions/146337/…
    – iDev247
    Feb 5, 2013 at 20:08
  • I had an issue with api.edge.launchpad.net no longer being supported. resolved by adding 91.189.89.224 api.edge.launchpad.net 91.189.89.225 api.edge.launchpad.net in /etc/hosts May 21, 2015 at 13:24
5

Thanks to Dig for the info on the 3rd party PPA for PHP 5.3.10. I was able to upgrade my 10.04 install using those instructions.

One hiccup during the upgrade was that I did not have apt-add-repository available on my system. It turns out this is provided by the package python-software-properties.

For anyone with the same issue, install it with:

sudo apt-get install python-software-properties

You should then have apt-add-repository available on your system.

0

Mostly software/applications are get updated automatically with regular updates in Ubuntu (and in other GNULinux distribution) if the latest version is available in repository.

PHP has released 5.3.10 version as stable but I'm afraid it is not available on Ubuntu's repository yet. And I don't think they would make available for 10.04. Because if you check here (under "Packages by distribution->Ubuntu") the PHP's availability for each version of Ubuntu, you can find even latest version of PHP available for Ubuntu 12.04 (which is not released not yet) is 5.3.8. And for 10.04 it is 5.3.2. May be thats why it is not getting updated when you do regular update.

Now, even if you update Ubuntu to the latest stable version, which is 11.10, you are not going to get PHP 5.3.10 but 5.3.6.

May be you should wait until they update their repository. Or if you cannot wait then download it from it's website and compile & install it yourself, if you know how to do it.

:)

1
  • yah! my plan is to install the PHP manually I already downloaded the php-5.3.10.tar.gz. But i dont know to istall it. =)
    – jrsalunga
    Feb 8, 2012 at 1:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .