These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for composer on the new forum.
Good afternoon,
I have a virtualmin server running multiple versions of PHP
/etc/php.ini Global PHP configuration (5.3)
/opt/rh/php54/root/etc/php.ini PHP 5.4
/opt/rh/php55/root/etc/php.ini PHP 5.5
Website.domain.com is set to PHP 5.5, a phpinfo file confirms this.
if i login as the Website.domain.com user and run
#php -v
it shows as 5.3.3 in the interpreter
># /opt/rh/php55/root/usr/bin/php -v
shows 5.5.21 as the interpreter
I am trying to run
># composer update
and its failing due to dependencies and incompatibility with the PHP 5.3.3
Has anyone seen this before or does anyone have a work around?
Thanks in advance,
Howdy,
I'm unfortunately not familiar with composer, but it's likely trying to use the default version of PHP located in /usr/sbin.
You may need to determine how it's calling PHP, and modify it so that it's pointing to your preferred PHP version. That all may unfortunately mean changing the composer file itself.
Eric
Thanks Andrey, That was about as far as I got too. Ive tried adding an alias to Website.domain.com's
./bash_profile
for the php55 version of php. but that didnt help when running thecomposer update
commandyou should just have to have the correct PHP executable in your path - so you can probably either
scl enable php55
or
set your path to have /opt/rh/php55/root/bin at the beginning of your path variable.
In the event someone has the same problem, the solution was to log in as the website.domain.com user and run
scl enable php55 bash
This user's cli version of PHP is now the PHP55 build, no other user is affected, most importantly my
composer update
now worksupdate to enable php7 in CLI:
scl enable rh-php70 bash