Home > Net >  Switch php versions on start composer update
Switch php versions on start composer update

Time:01-31

I have PHP v7.4 on Ubuntu server. And I have an alternative PHP in the path /opt/php81/bin/ I need to start command composer update with PHP 8.1 I tried like that /opt/php81/bin/php composer update but I see the error

Could not open input file: composer

I tried that /opt/php81/bin/php composer update --working-dir=/var/www/user/data/www/myweb.site and I see the same error.

CodePudding user response:

I found that this solution works !

/opt/php81/bin/php /usr/local/bin/composer update --working-dir=/var/www/user/data/www/myweb.site
  • Related