PHP (Personal Home Page, Hypertext Preprocessor) is a popular programming language that is served on the server side, being this one of the largest languages used throughout the web, this it is especially suitable for web development and that can be embedded in HTML.
Due to its great popularity, like any other application tends to update and it is to be expected because, as I mentioned, it is one of the most used languages on the web, that is why security bugs are constantly being fixed.
Today It is in its stable version 7.1.9 which was released a few days ago.
This new branch it is not by default in Ubuntu repositories and the installation of it, this time will have to be different from what was commonly handled.
How to install PHP 7.1 on Ubuntu 17.04 and derivatives?
To perform a correct installation of PHP on our system, we will first have to open a terminal and install the following:
sudo apt-get install -y python-software-properties
Now the following will be add this repository in order to install the most current version of PHP.
sudo add-apt-repository -y ppa:ondrej/php
In the next act we proceed to update the repositories
sudo apt-get update
With this we have everything ready to install the necessary PHP packages. We install these with the following command:
sudo apt install php7.1 php7.0-cli php7.1-common php7.1-mbstring php7.1-intl php7.1-xml php7.1-mysql php7.1-mcrypt
At the end of the installation we can check the PHP version that we have installed in the system with the command:
php –v
With which it will show us a message similar to this:
PHP 7.1.9-0ubuntu0.17.04 (cli) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.15-0ubuntu0.16.04.4, Copyright (c) 1999-2017, by Zend Technologies
Now, having the application installed on our system, the path of the configuration file is as follows:
/etc/php/7.1/apache2/php.ini
Where we can make the necessary adjustments to start working with the application in the system. They can use the text editor for this.
sudo nano /etc/php/7.1/apache2/php.ini
And with that would be it.
Well for now I have installed the one that works for Google apps.