How to install / setup PHP 5.5.x on Ubuntu

How to install / setup PHP 5.5.x on Ubuntu

How to install

There’s an excellent and (usually) hassle-free method to install the latest version of PHP5 (which is 5.5.3 when i’m writing this) with 3 simple bash commands:
1. Add this package-repository to your system. If Ubuntu says that you need to download a key first, then follow the instructions given in the notice.
sudo add-apt-repository ppa:ondrej/php5
If you get an error message now, then please do an update first and install the python-software-properties, that need to be necessary to add a package repository:

sudo apt-get update
sudo apt-get install python-software-properties
2. Update
sudo apt-get update
3. Install PHP
sudo apt-get install php5
Check the installed version of PHP via
php5 -v
Please note: The ondrej/php5 repository (which is used here) provides the very latest version of PHP. Usually the new version of PHP is available a few days after it was been officially released. This is really cool and a big step forward as Ubuntu, Debian, CentOS etc. provide only very old versions by default.

To UPDATE from PHP 5.3 / 5.4 to PHP 5.5:

It’s also possible to update from any PHP version to the latest one with exactly the commands above. But, after doing
sudo apt-get install php5
you’ll have to restart the server with
sudo /etc/init.d/apache2 restart
or
sudo service apache2 restart

Comments

Popular posts from this blog

Backup & Restore Database as SQL Dump by SqlYog

Postfix can support per-domain outgoing IP addresses, but is not currently configured to do so

Wanna-cry-ransomware