I am currently running PHP 5.4.6-1ubuntu1.1 (cli) (built: Nov 15 2012 01:18:34) on xubuntu . I would like to update to latest version or >= 5.4.7. Is there another way to do instead of making it from source? If source is the only solution can you please guide me how to do it painless.

Update: I did this:

https://serverfault.com/questions/431805/upgrading-php-from-php-5-3-to-5-4-7 and http://wiki.helioviewer.org/wiki/Compiling_PHP_from_source_on_Ubuntu

Now from the CLI it shows 5.4.12 but from Apache it is still 5.4.6. Any ideas how to make Apache use the new installation of PHP?


Ondřej Surý, one of the Debian PHP maintainers, maintains a PPA with newer PHP versions for easy installation on Ubuntu. Instructions are on the PPA page itself: https://launchpad.net/~ondrej/+archive/php5

Note that this is an "untrusted" source since Ondřej's PPA isn't part of Ubuntu. But you may choose to trust him because he's a Debian PHP maintainer so his work on PHP ends up in official Ubuntu releases anyway.

This will update the main system installation of PHP, rather than one in /usr/local. So you won't have to repoint anything in Apache to use the updated version.

  • I have added the PPA to my system as described for Quantal 12.10 bu t it complains when I try to do apt-get update with the following message: W: GPG error: ppa.launchpad.net quantal Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4F4EA0AAE5267A6C
    – painkiller
    Mar 12 '13 at 11:39

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