Page 1 of 1

php version in cli

Posted: Thu Dec 06, 2018 2:09 pm
by KEZERN
I have used this thread to install multiple php versions.
viewtopic.php?f=19&t=10854
Now I want to install Larevel via composer and it detects 5.6 php version.
How can I change php version in cli?

Best regards!

Re: php version in cli

Posted: Thu Dec 06, 2018 4:17 pm
by Alex Connor
you can use

Code: Select all

php70 /usr/local/composer install
for example

Re: php version in cli

Posted: Thu Dec 06, 2018 6:22 pm
by KEZERN
Thank you very much!
That worked!

Re: php version in cli

Posted: Thu Dec 06, 2018 8:07 pm
by mehargags
To change Default version of PHP-CLI

Code: Select all

update-alternatives --set php /usr/bin/php7.x

Re: php version in cli

Posted: Fri Dec 07, 2018 4:01 pm
by Alex Connor
if I have several projects that use different versions of php, then my version is very good in this case