1

I am currently running PHP 5.4.9 on Ubuntu 13.04 and I want to upgrade to 5.5 because of the new password_* library and other features. What is the easiest and least painful way to upgrade?

Paul Gear
  • 4,367
  • 19
  • 38
Programit
  • 121
  • 2

1 Answers1

2

Unfortunately, there's no easy and painless way to upgrade now. You installed from the official sources, and it's definitely easiest to stick with them.

General ways to get an updated version are:

  • Wait for the next release.
  • Use the version from backports. Unfortunately, PHP 5.5 is not available on raring-backports yet (http://packages.ubuntu.com/search?suite=raring-backports&keywords=php5).
  • If you're not running a production site, one option is to manually download and install the packages from the next version - in this case, saucy (13.10; it appears that saucy has the newer version: http://packages.ubuntu.com/saucy/php5). But this won't be kept up-to-date with newer versions, may have dependencies, won't get security support until saucy is officially released, and (worst-case) may not work at all on raring (13.04).
  • Add the saucy repositories and use apt-pinning to ensure that you only upgrade the php5 package (and dependencies). This isn't easy, IMO, and doesn't give you security updates.
  • Install from source. But then you have to either install a non-packaged version or build your own packages. Then you get the version you want, but this isn't easy like installing a package, nor does it take the pain out of later upgrades.
Paul Gear
  • 4,367
  • 19
  • 38
  • Thanks for this, I think I will stay with 5.4.9, and use https://github.com/ircmaxell/password_compat - password_* functions that are compatible older versions. – Programit Aug 24 '13 at 06:01