Unable to execute magento command under a PHP: Magento supports PHP 5.6, 7.0.2, and 7.0.6 or later

Created:

2017-08-11 23:23:13 UTC

Modified:

2017-08-11 23:25:25 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to execute magento command under a PHP: Magento supports PHP 5.6, 7.0.2, and 7.0.6 or later

Symptoms

Unable to execute magento command under PHP:

# php magento indexer:reindex
Magento supports PHP 5.6, 7.0.2, and 7.0.6 or later. Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html

Domain uses PHP 5.6 or higher in Domains > example.com > PHP Settings Server

PHP version used on a server is 5.4:

# php -v
PHP 5.4.16 (cli) (built: Nov 6 2016 00:29:02) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.0.18, Copyright (c) 2002-2015, by ionCube Ltd.

Cause

Command "php magento" is executed from within server PHP (PHP by OS vendor) which is not supported by Magento as it is 5.4 version

Resolution

Run the command from within PHP version that domain uses:

# /opt/plesk/php/5.6/bin/php magento indexer:reindex

Have more questions? Submit a request
Please sign in to leave a comment.