I get the CLI message:
"Magento supports 7.0.2, 7.0.4, and 7.0.6 or later. Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html"
I am running Magento 2.2 on Ubuntu (hosted by Dreamhost). It largely works.
I am running PHP 7.1.10 (determined by going to http://<domain>/phpinfo.php and phpinfo.php including a line "phpinfo();".)
I am running PHP 7.1.10 on the command line as well (determined by running "php -v" on the command line and getting back:
PHP 7.1.10 (cli) (built: Oct 13 2017 21:51:56) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.10, Copyright (c) 1999-2017, by Zend Technologies
When I try the following command:
magento dev:tests:run --help
I get the response:
"Magento supports 7.0.2, 7.0.4, and 7.0.6 or later. Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html"
I read the various posts that mention this error and they all seem to stem from the user running php 5.6 or earlier on the command line even though they are running a later php on the web interface.
Where in the code can I find the test that Magento determines that I am not running the right version of php?
There are some tips on what to check on this page but it does sound like you've done some of these already: http://devdocs.magento.com/guides/v2.1/comp-mgr/trouble/cman/php-version.html. It does say that it will complain if there's a mismatch between web and cli.
Which version of Magento 2 are you using. If you're on 2.1.x then PHP 7.1.x isn't supported. See the matrix on http://devdocs.magento.com/guides/v2.1/install-gde/system-requirements-tech.html. As you're running php 7.1.10, you'll need to upgrade Magento or downgrade your php.
Same problem here, I have magento 2.2.1, php 7.1.1 and it doesn't work.
To help figure this out, I edited the file ./app/bootstrap.php (this file can be viewed at https://github.com/magento/magento-cloud/blob/master/app/bootstrap.php).
After the line:
echo 'Magento supports 7.0.2, 7.0.4, and 7.0.6 or later. ' .
'Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html';
I added the lines:
echo "You are running";
echo PHP_VERSION_ID;
That tells me that "magento dev:tests:run --help" is being executed by a PHP version with the ID "50631", suggesting it is running 5.6 or similar, despite the fact that my command line is running 7.1.
Now that I have narrowed down the problem, the solution for me is instead of:
magento dev:tests:run --help
I run this:
php $magDIR/bin/magento dev:tests:run --help
where $magDIR is where I installed magento.
Thanks. Per my post, I am running PHP 7.1 and magento 2.2. I don't know what the issue is, but I found a workaround and that's good enough for me.
@WilderGlass It does sound like you need to change your web server configuration. PHP command line is separate from PHP through the web server and you can quite easily run two different PHP versions this way. This is proved by your useful debugging. I don't know what you're hosting set up is but you will need to check how PHP is configured and make sure that it's using a newer version of PHP to be compatible with Magento.
I have the same problem. Magento 2.2 and PHP 7.1.1. I need to install Polish and I don't have the ability now. I can't downgrade PHP version, Plesk doesn't have 7.02, 7.0.4, 7.0.6 ...
What now?
I have the same problem.
Not sure which PHP I have.
I am having exactly the same problem here. Can anybody provide or has found step by step solution that beginner could understand?