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 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:

http://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?

share|improve this question

marked as duplicate by Eliah Kagan, Kevin Bowen, Chris Wilson, hhlp, Jorge Castro Mar 20 '13 at 15:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer
    
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
    
Solved it, thanks –  painkiller Mar 12 '13 at 11:54

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