PHP7.1 has been installed but php -v still show PHP5.6
772
I've been installed PHP7.1 and my on my laptop has 2 php versions there are
PHP 5.6 and PHP7.1 , i tried a2dismod php5.6 and a2enmod php7.1 then i restarted .. and i tried php -v still show me old version , anyone have solution about this ?
a2dismod is a command that disables php support for apache service.
On the other hand, php-cli package is only meant to work for console (in terminal).
Unless you uninstall php-cli package (or php7.1-cli for 7.1 version) you will be able to work with php in terminal (even it won't work on your webservice at the time)
If you want to replace php 5.6 with 7.1 in the cli do this:
That version has to do with the
cli
(command-line interpreter) version which you might not have installed so install it:then check that version again. Noe remove the other version:
if that is what it's called, then restart you server.
a2dismod is a command that disables php support for apache service. On the other hand, php-cli package is only meant to work for console (in terminal). Unless you uninstall php-cli package (or php7.1-cli for 7.1 version) you will be able to work with php in terminal (even it won't work on your webservice at the time)
If you want to replace php 5.6 with 7.1 in the cli do this:
this should replace your current cli version with 7.1 and
php -v
should show your desired version