Page 1 of 1

changing terminal php version

Posted: Mon 25. Nov 2019, 19:57
by seenu
Hello,
how do i change terminal php version?

since i use composer, my project requires php 7.2, eventhough i set php version to 7.2, when it tries to install composer packages, it is using default php version (which is 7.0) so it is failing.

thanks

Re: changing terminal php version

Posted: Tue 26. Nov 2019, 01:08
by OlliTheDarkness
You can address the required PHP directly:
e.g.

Code: Select all

/opt/keyhelp/php/7.2/bin/php
followed by your command to run over it.

I think Alexander has also created another solution for this.

However, I'm just not sure or I can not find the intended post.

Greeting Olli

Re: changing terminal php version

Posted: Tue 26. Nov 2019, 09:03
by stfn116
OlliTheDarkness wrote: Tue 26. Nov 2019, 01:08
However, I'm just not sure or I can not find the intended post.

Greeting Olli

I think you were searching for this:

Code: Select all

keyhelp-php73
keyhelp-php72
keyhelp-php71
...

PHP-FPM accessible via:

keyhelp-php73-fpm
keyhelp-php72-fpm
keyhelp-php71-fpm
...

Re: changing terminal php version

Posted: Wed 18. Dec 2019, 16:59
by ruediger00
I'm running into the same problem. "keyhelp-php73" works fine, but after I get some problem with include paths. Any solutions?

Code: Select all

www@kmXXX:/home/users/www/www/site$ keyhelp-php73 /usr/bin/composer install
PHP Warning:  require(Composer/autoload.php): failed to open stream: No such file or directory in /usr/bin/composer on line 8
PHP Warning:  require(Composer/autoload.php): failed to open stream: No such file or directory in /usr/bin/composer on line 8
PHP Fatal error:  require(): Failed opening required 'Composer/autoload.php' (include_path='.:/opt/keyhelp/php/7.3/lib/php') in /usr/bin/composer on line 8