Magento – Magento 2 bin/magento command prompting php version message

localhostmagento2PHPserver-setup

I'm running Magento 2 on MAMP Pro local dev server (mac osx). I have site installed and running fine.

If I try to run following command in site root in terminal, php bin/magento indexer:reindex I get following message:

Magento supports PHP 5.5.0 or later. Please read
http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html

How do I fix this?

Best Answer

OSX comes with a version of PHP installed, which can break things.

php --ini can tell you if you're running the OSX version of PHP, or the MAMP version of PHP.

You can also do php --info to double check the PHP version you're running.

MAMP comes with several versions of PHP, so you may also need to go into MAMP settings and change to a newer version of PHP.

Also see: https://stackoverflow.com/questions/4145667/how-to-override-the-path-of-php-to-use-the-mamp-path

Related Topic