changing terminal php version

Locked
seenu
Posts: 1
Joined: Mon 25. Nov 2019, 19:55

changing terminal php version

Post 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
User avatar
OlliTheDarkness
Posts: 1854
Joined: Tue 14. Aug 2018, 16:41
Location: Essen (NRW)

Re: changing terminal php version

Post 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
Mit freundlichen Grüßen
OlliTheDarkness

**************************************************************
Helden leben lange, Legenden sterben nie

:!: World Hack Organization :!:
**************************************************************
User avatar
stfn116
Posts: 306
Joined: Wed 9. Jan 2019, 11:43
Location: Bavaria

Re: changing terminal php version

Post 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
...
:D Wer meint, Kompetenz sei teuer, möge es einmal mit Inkompetenz versuchen. Zitat: Bernd W. Klöckner. :lol:
User avatar
ruediger00
Posts: 4
Joined: Wed 18. Dec 2019, 16:27

Re: changing terminal php version

Post 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
Locked