I am trying to update to php 5.4 in Ubuntu 12.04, and I can only get 5.3.6 using official repositories (using apt-get).
I'm not really sure how to do a manual update – I'm sorta new to ubuntu, but I need to play around with the new php features!
You could use a PPA to stay up-to-date with PHP. I use:
The PHP5 PPA is now on 5.5 and also includes Apache 2.4 update. For Apache 2.2 + PHP 5.4 repository, see the bottom of the answer.
If you want use these PPAs, do this:
ppa:ondrej/php (for PHP 5.6/ PHP 7.0)
ppa:ondrej/php5-5.6 (for PHP 5.6)
ppa:ondrej/php5 (for PHP 5.5)
If you don't have
Prepackaged latest PHP 5.4 now resides in separate PPA: ppa:ondrej/php5-oldstable
It will take some time for PHP 5.4 packages to make their way into Ubuntu, as there are an awful lot of dependency checks to do. Ubuntu 12.04 is now in beta so I doubt they'll upgrade it to PHP 5.4 (although I have no official or inside knowledge of this) -- it probably won't appear until Ubuntu 12.10 in October this year. If you want it sooner than that, you'll either have to find a third-party package or learn to build it yourself from the source code.
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?