Skip to content

Magento compatibilty issues with PHP 7.1 #8569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
anujeetphj opened this issue Feb 15, 2017 · 25 comments
Closed

Magento compatibilty issues with PHP 7.1 #8569

anujeetphj opened this issue Feb 15, 2017 · 25 comments
Labels
Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed

Comments

@anujeetphj
Copy link

anujeetphj commented Feb 15, 2017

My Magento version is 2.1.3
Php version 7.1.1

At first place when I installed Magento with PHP 7.1 ut does not give any errors. But suddenly from today there are warnings coming for depreciatesd functions specifically (mcrypt/mdecrypt) functions in Magento/framework...Crypt.PHP file. If it doesn't support a certain PHP verSion, why didn't it give me warning in the first place while installation?

@anujeetphj anujeetphj changed the title Magento compatibilty issues with PHP 7.1 Magento compatibilty issues with PHP 7.1 Feb 15, 2017
@orlangur
Copy link
Contributor

According to https://github.com/magento/magento2/blob/develop/composer.json#L11 you should not be able to install :) Is there a bug in installer or you did some composer install --ignore-platform-reqs ?

suddenly from today there are warnings coming for depreciatesd functions specifically

Most likely you changed display_errors setting. This could be suppressed by something like #5880 (comment).

There are a bunch of issues regarding desired PHP 7.1 support reported already.

@anujeetphj
Copy link
Author

anujeetphj commented Feb 15, 2017 via email

@anujeetphj
Copy link
Author

anujeetphj commented Feb 15, 2017 via email

@orlangur
Copy link
Contributor

@anujeetphj any reason to use PHP 7.1 instead of 7.0 at the moment?

@orlangur
Copy link
Contributor

orlangur commented Feb 15, 2017

I don't see require section in your composer.json, here is the correct one: https://github.com/magento/magento2/blob/develop/composer.json

2.2.0 is not released yet by the way, only available in dev branch.

@anujeetphj
Copy link
Author

anujeetphj commented Feb 15, 2017 via email

@orlangur
Copy link
Contributor

For 2.1.3 PHP 7.1 should not pass system requirements check too: https://github.com/magento/magento2/blob/2.1.3/composer.json#L11

@orlangur
Copy link
Contributor

Not 7.0.6 is recommended, but 7.0.6 and higher. Any version higher than 7.0.6 in 7.0.x will pass ~7.0.6 constraint.

@anujeetphj
Copy link
Author

anujeetphj commented Feb 15, 2017 via email

@avoelkl
Copy link
Contributor

avoelkl commented Feb 16, 2017

Why are you using PHP 7.1 @anujeetphj ?

According to the DevDocs it's not supported yet:

Not supported by any 2.1.x version:

PHP 7.1
PHP 5.5

@vrann
Copy link
Contributor

vrann commented Mar 13, 2017

@anujeetphj closing as an issue with unsupported PHP version. In the latest develop there were couple of fixes related to PHP 7.1

@vrann vrann closed this as completed Mar 13, 2017
@markshust
Copy link
Contributor

This ticket should be reopened. This error still happens when attempting to install 2.1.6:

  [Exception]                                                                                                                              
  Deprecated Functionality: Function mcrypt_module_open() is deprecated in /var/www/html/vendor/magento/framework/Encryption/Crypt.php on  
   line 54       

@vrann
Copy link
Contributor

vrann commented May 16, 2017

@markoshust 7.1 is not supported in 2.1.6, please see the link above

@csdougliss
Copy link
Contributor

This needs to be resolved in 2.1 branch! Who knows how long 2.2 will take?

@markshust
Copy link
Contributor

FYI here is the actual ticket to reference now: #5701

I agree with @craigcarnell -- this is a bug/flaw and shouldn't wait for a major release. Considering the above ticket is almost a year old, and PHP 7.1 was released 6 months ago... what is taking so long here? This could be classified as a pretty urgent/security fix. The additional overhead we are seeing of Magento 2 falling behind current versions of PHP is also super concerning.

@orlangur
Copy link
Contributor

This could be classified as a pretty urgent/security fix

Actually, not. Upstream Magento still uses mcrypt but suppresses notices so that system is still workable under PHP 7.1. This obviously will not work for PHP 7.2, where mcrypt_* functions are going to be removed, but is absolutely fine for now.

Maybe somebody from community is willing to backport such fix to 2.1?

@southerncomputer
Copy link
Contributor

You can use the develop patches to insert @ sign in front of every mcrypt* function to stop the warnings, but you have to change the VOID to VOIDACTION controllers as well since void is reserved in 7.1 - same patches for develop work for 2-1!

@southerncomputer
Copy link
Contributor

there are also a few areas where slack typing fails under php-7.1 iirc. Rendering totals maybe in a non-magento module or customization!

You should not attempt to use php 7.1.x with Magento 2.1.x - if you cannot figure out how to get past the PHP Version check! STOP!

@southerncomputer
Copy link
Contributor

PHP 7.0.21 or PHP 5.6.31 have the latest security patches and are compatible with Magento 2.1 - i'd suggest 7.0.21 - btw 7.1.1 is very old and has security issues itself! 7.1.7 is latest!

google how to upgrade to latest version of php 7.0 on centos 7 - for walk through assuming you have centos 7 as an os!

@orlangur
Copy link
Contributor

@shinji-sakai you looked into the right composer.json, but PHP 7.1 support was not backported to 2.1.x (and there are no plans to backport it according to responses from Magento crew here).

@markoshust PHP 7.1 support in Magento 2.2.x has nothing to do with security as it simply suppresses warnings generated by mcrypt_* calls. Upgrading to the last PHP 7.0.x and even 5.6.x is the right way to go.

@ruCyberPoison
Copy link

PHP Version Check
Your PHP version is 7.1.8-1ubuntu1. The required PHP version is ~5.6.5|7.0.2|7.0.4|~7.0.6.

why i get this issue ?

some thing to fix this problem ?

@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Nov 23, 2017
@orlangur
Copy link
Contributor

@Screamfox, GitHub is intended for bug reports, please use Magento Stack Exchange for questions.

Most likely you use Magento 2.1.x which does not support PHP 7.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed
Projects
None yet
Development

No branches or pull requests

10 participants