Answer the question
In order to leave comments, you need to log in
Different versions of php in the console and in the browser, how to bring to one?
Hello
Worth php fpm 5.6 and nginx. I had to add php fpm 7 - installed, and now I always use php cli 7.0 in the console
[email protected]:~$ sudo service php7.0-fpm start
[email protected]:~$ php -v
PHP 7.0.29-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Apr 5 2018 08:34:50) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3. 0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.29-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans
[email protected]:~$ sudo service php7.0-fpm stop
[email protected]:~$ sudo service php5.6-fpm start
[email protected]: ~$ php -v
PHP 7.0.29-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Apr 5 2018 08:34:50) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3. 0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.29-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans
Answer the question
In order to leave comments, you need to log in
Use it in the console like this: php7.1
Or, to use regular php, do: update-alternatives --config php
And on the web (fpm), they do not interfere with each other in any way and normally live side by side.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question