• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Magento 2 / Composer / Multiple PHP issue

WebHostingAce

Silver Pleskian
Hi,

How can I run composer in PHP 7.1.? It seems even the PHP commands runs in PHP 7.1 composer find the system PHP 5.4. How can I over come this issue?

Code:
bash-4.2$ alias php='/opt/plesk/php/7.1/bin/php'
-bash-4.2$ composer update
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
    - magento/product-community-edition 2.2.3 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (5.4.16) does not satisfy that requirement.
    - magento/product-community-edition 2.2.3 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - Installation request for magento/product-community-edition 2.2.3 -> satisfiable by magento/product-community-edition[2.2.3].

  To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php.ini
    - /etc/php.d/00-ioncube-loader.ini
    - /etc/php.d/curl.ini
    - /etc/php.d/dom.ini
    - /etc/php.d/fileinfo.ini
    - /etc/php.d/gd.ini
    - /etc/php.d/imap.ini
    - /etc/php.d/json.ini
    - /etc/php.d/mbstring.ini
    - /etc/php.d/mysql.ini
    - /etc/php.d/mysqli.ini
    - /etc/php.d/pdo.ini
    - /etc/php.d/pdo_mysql.ini
    - /etc/php.d/pdo_sqlite.ini
    - /etc/php.d/phar.ini
    - /etc/php.d/sqlite3.ini
    - /etc/php.d/wddx.ini
    - /etc/php.d/xmlreader.ini
    - /etc/php.d/xmlwriter.ini
    - /etc/php.d/xsl.ini
    - /etc/php.d/zend_extensions_psa.ini
    - /etc/php.d/zip.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
-bash-4.2$

Thank you.
 
Thank you @IgorG

I created a .profile file with,

alias php='/opt/plesk/php/7.1/bin/php'
alias composer='/opt/plesk/php/7.1/bin/php /usr/lib64/plesk-9.0/composer.phar'

Problem solved.
 
Back
Top