Question

How to upgrade PHP to v5.5 in Ubuntu 12.04

  • Posted September 22, 2013

I saw that Zend Opcode is now baked into PHP 5.5 so am keen to apgrade my Virtualmin / LAMP install.

Is this relatively easy and how do I go about it (remembering I’m a greenhorn to command line Linux / VPS)

Thanks for helping.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I was able to update to PHP 5.5 following the instructions on http://askubuntu.com/a/109544. But by upgrading to Apache 2.4, the config file got overwritten. And I didn’t know what to change to keep it working.

Luckily, I took a Snapshot before upgrading and then I restored from Snapshot. So everything’s back to normal now.

I followed the instructions at http://askubuntu.com/a/109544 and the only hiccup I found was that by default PHP was disabled in user home directories, where my document root happened to be. Commenting out that block in /etc/apache2/mods-available/php5.conf fixed it for me.

I don’t think you can install a Debian Wheezy/Squeeze/etc repo on Ubuntu, however the guy that maintains DotDeb.org also maintains an Ubuntu PPA with the same packages: <br> <br>ppa:ondrej/php5: https://launchpad.net/~ondrej/+archive/php5

Use the dotdeb repository which includes PHP 5.5 <br> <br>www.dotdeb.org/instructions/

@martin, <br> <br>Why not: <br> <br>1.) take a snapshot of your droplet; <br>2.) spin up a new droplet from that snapshot; <br>3.) try upgrading to PHP v5.5; <br>4.) if all goes well, follow the same steps on your original droplet; then <br>5.) destroy the newer droplet?

As a newbie, I think I’ll pass. It looks decidely un-official and if I get stuck or confused, I don’t have enough experience to get myself out of trouble :) <br>Thanks anyway Kamal

Take a look at this post: <a href=“http://askubuntu.com/a/109544”>http://askubuntu.com/a/109544</a> <br> <br>Give it a shot and let me know how it goes.