cancel
Showing results for 
Search instead for 
Did you mean: 

Different Php version in plesk and SSH

Different Php version in plesk and SSH

 

Hi, I want to update my Magento 2.2.6 to the 2.3.

I have changed the php version from plesk to the 7.2.13 fpm.

but in SSH using php -v i get the old value php 7.0

After that i have tried to change SSH php version using:

echo "alias php='/opt/plesk/php/7.1/bin/php'" >> ~/.bashrc

now i have this situation:

 

php -v
PHP 7.2.13 (cli) (built: Dec  7 2018 11:47:18) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.2.1, Copyright (c) 2002-2018, by ionCube Ltd.
    with Zend OPcache v7.2.13, Copyright (c) 1999-2018, by Zend Technologies
root@admin41347168:/var/www/vhosts/domain.it/test.domain.it# composer update
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for magento/product-community-edition 2.3.0 -> satisfiable by magento/product-community-edition[2.3.0].
    - magento/product-community-edition 2.3.0 requires php ~7.1.3||~7.2.0 -> your PHP version (7.0.32) does not satisfy that requirement.

Why am I getting this error if the php version is 7.2.13 both in plesk and in SSH?

 

1 REPLY 1

Re: Different Php version in plesk and SSH

Try

echo 'export PATH="/opt/plesk/php/7.1/bin:$PATH"' >> ~/.profile

Load the .profile file:

source ~/.profile