1

I am currently trying to install Magento 2 on a server running php 5.4 and Plesk 12.5. My hosting company advises against upgrading the php version to support Magento 2 since it could potentially break Plesk. Instead they recommended to use Plesk's native support for multiple versions of PHP.

With Plesk I setup and installed PHP 5.6.14 to support Magento 2. I ran a test and the 5.6.14 is running fine on the domain I selected. However, running composer install still detects the older version of php since it is the server default.

Does anyone have any experience getting around this issue? All of the PHP files detect and run the updated version of PHP but composer install script and even just running php -v detects the outdated version of PHP.

How could I get Magento 2 up and running on this server?

Thanks

1 Answer 1

1

Take a look at http://talk.plesk.com/threads/upgrade-default-php.334442/

If you use composer from command line, you should add correct path to php binary in PATH env.

For example, my system php is 5.5:
$ php -v
PHP 5.5.9-1ubuntu4.11 (cli) (built: Jul 2 2015 15:23:08)
$ which php
/usr/bin/php

But I want to use php 5.6 installed by Plesk:
$ /opt/plesk/php/5.6/bin/php -v
PHP 5.6.13 (cli) (built: Sep 8 2015 11:53:39)
$ export PATH=/opt/plesk/php/5.6/bin:$PATH
$ php -v
PHP 5.6.13 (cli) (built: Sep 8 2015 11:53:39)

$ which php
/opt/plesk/php/5.6/bin/php
0

Not the answer you're looking for? Browse other questions tagged or ask your own question.