cancel
Showing results for 
Search instead for 
Did you mean: 

"Magento supports 7.0.2, 7.0.4, and 7.0.6 or later."

"Magento supports 7.0.2, 7.0.4, and 7.0.6 or later."

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?

9 REPLIES 9

Re: "Magento supports 7.0.2, 7.0.4, and 7.0.6 or later."

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. 

----
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!

Re: "Magento supports 7.0.2, 7.0.4, and 7.0.6 or later."

Same problem here, I have magento 2.2.1, php 7.1.1 and it doesn't work.Schermata 2017-11-14 alle 12.52.24.png

Re: "Magento supports 7.0.2, 7.0.4, and 7.0.6 or later."

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.

 

 

Re: "Magento supports 7.0.2, 7.0.4, and 7.0.6 or later."

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.

Re: "Magento supports 7.0.2, 7.0.4, and 7.0.6 or later."

@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. 

 

----
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!

Re: "Magento supports 7.0.2, 7.0.4, and 7.0.6 or later."

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?

Re: "Magento supports 7.0.2, 7.0.4, and 7.0.6 or later."

I have the same problem. 

 

Not sure which PHP I have. 

Re: "Magento supports 7.0.2, 7.0.4, and 7.0.6 or later."

I am having exactly the same problem here. Can anybody provide or has found step by step solution that beginner could understand? 

 

yAdLNID

Re: "Magento supports 7.0.2, 7.0.4, and 7.0.6 or later."

Late post but anyone using cpanel with PHP set at a compatable version and the command line is still using PHP5.6, contact your host, they can probably help. In my instance (and credit to Siteground for helping me), I need to prefix the commands with the version to use such as: /usr/local/php71/bin/php-cli bin/magento WHATEVER YOU ARE DOING Siteground (and other hosts) offer multiple versions but ssh will always use the default. Come 2019 all this will change of course.