HostOnNet Blog

Install PHP 5.5 on Ubuntu 12.x

To install PHP 5.5.x on Ubuntu, add PPA

sudo add-apt-repository ppa:ondrej/php5

To install PHP 5, run

sudo apt-get update
sudo apt-get install php php-cli

For updating existing version of PHP, run

apt-get update
apt-get dist-upgrade

PHP Version before upgrade

root@flashwebhost-desktop:~# php -v
PHP 5.3.10-1ubuntu3.11 with Suhosin-Patch (cli) (built: Apr  4 2014 01:27:23)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
root@flashwebhost-desktop:~#

After Upgrade

root@flashwebhost-desktop:~# php -v
PHP 5.5.10-1+deb.sury.org~precise+1 (cli) (built: Mar 27 2014 16:16:25)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with XCache v3.1.0, Copyright (c) 2005-2013, by mOo
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
    with XCache Optimizer v3.1.0, Copyright (c) 2005-2013, by mOo
    with XCache Cacher v3.1.0, Copyright (c) 2005-2013, by mOo
    with XCache Coverager v3.1.0, Copyright (c) 2005-2013, by mOo
root@flashwebhost-desktop:~#

XCache is exta, i installed it with

apt-get install php5-xcache

After PHP Upgrade.


Posted in PHP, Ubuntu