I am trying to update my php version, from 7.1.9 to 7.2.7
I use:
sudo apt-get update
sudo apt-get upgrade
sudo add-apt-repository ppa: ondrej / php
sudo apt-get install php7.2 php7.2-common
sudo apt-get install php7.2 php7.2-cli php7.2-common php7.2-json php7.2-opcache php7.2-mysql php7.2-mbstring
sudo apt-get update
sudo apt-get upgrade
then I run php -v
and he shoots me:
PHP 7.1.9 (cli) (built: Sep 18 2017 02:29:39) (NTS)
I can not get the version that I just downloaded.
I try with:
sudo update-alternatives --set php /usr/bin/php7.2
and neither, again:
PHP 7.1.9 (cli) (built: Sep 18 2017 02:29:39) (NTS)
I try with:
sudo a2enmod php7.2 (before I verify that apache is stopped)
who returns to me:
Considering dependency mpm_prefork for php7.2:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php7.2:
Module php7.2 already enabled
and until here it arrives, because it continues with:
PHP 7.1.9 (cli) (built: Sep 18 2017 02:29:39) (NTS)
I will greatly appreciate help, I do not know what command to execute.