Skip to content

Magento 2.1 php7.1 will not be supported due to mcrypt deprecation #5880

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
acidreian666 opened this issue Jul 29, 2016 · 19 comments
Closed
Labels
bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@acidreian666
Copy link

Been testing Ubuntu & PHP7.1

Dev Docs say php7.1 will be supported on Magento 2.x CE
http://devdocs.magento.com/guides/v2.0/install-gde/system-requirements.html
7.0.2 up to 7.1.0, except for 7.0.5

Ubuntu 16.04; PHP7.1; Magento2.1; Nginx; Mysql5.7

Steps to reproduce

  1. I previously installed Magento2.1 (using support php7.0.8 via Ubuntu)
  2. Install add-apt-repository ppa:ondrej/php
  3. Sudo apt-get install php7.1-fpm (and all required extensions)

Expected result

  1. Be able to test CLI functions Ex; ( 'sudo php -f bin/magento indexer:reindex')
    completed indexing of database

Actual result

  1. [Exception]
    Deprecated Functionality: Function mcyrpt_module_open() is deprecated in ..../vendor/magento/framework/Encryption/Crypt.php Line 54

Further Investigation is that mcyrpt was deprecated in 2007 and we should be using OpenSSL

Check links
http://laravel.io/forum/07-01-2016-php71-and-mcrypt
https://dotdev.co/upcoming-changes-in-php-7-1-76ebea53b820#.lsf5xtam8

@tbenny
Copy link

tbenny commented Jul 29, 2016

php 7.1 is in beta stage now .In future release of magento 2.1.0 it needs to be taken care anyway

@southerncomputer
Copy link
Contributor

You can hide the deprecated warnings! The main problem is padding differences between mcrypt and openssl - so the question is - will a quickie switch to openssl_encrypt cause inability to decrypt the mcrypted data! This would not be serious if you weren't going online and will have 20K Customers who will have to re-key their passwords once PHP drops mcrypt completely and we need to choose between security (PHP) or not.

I would recommend trying openssl_encrypt instead of mcrypt_encrypt and see if we're going to run into problems in 6 months from now. When hopefully we have many stores with many users online with magento 2.x!

@hostep
Copy link
Contributor

hostep commented Jul 30, 2016

Duplicate: #5701

@piotrekkaminski
Copy link
Contributor

Thanks for the information @acidreian666 . We have removal of mcrypt and other encryption changes in our backlog under MAGETWO-39838 and it's related to #5701 as well but not duplicate.

@veloraven veloraven added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Oct 26, 2016
@timhofman
Copy link

timhofman commented Oct 26, 2016

@piotrekkaminski in which release can we expect this switch? We are currently running into performance issues in which \Magento\Framework\Encryption\Crypt.php:__construct is the bottleneck. It's adding several seconds to the response time.

mcrypt

@raatti
Copy link

raatti commented Dec 1, 2016

Any progress on this? PHP 7.1.0 is no longer a pre-release and is really preferrable to 7.0...

@mfdj
Copy link
Contributor

mfdj commented Dec 2, 2016

PHP 7.1 tag 🎉 php/php-src@85b9055

@BigL
Copy link

BigL commented Dec 2, 2016

I am on PHP 7.1 and
www-data@22a4f759a4d3:/data$ php --version
PHP 7.1.0RC6 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.1.0RC6, Copyright (c) 1999-2016, by Zend Technologies

www-data@22a4f759a4d3:/data$ ./bin/magento --version
Magento CLI version 2.1.2
the setup:upgrade works fine.

@ghost
Copy link

ghost commented Dec 20, 2016

I run 7.1 in production no problem. If you want to get around the error so you can run the install.
add this line

error_reporting(E_ALL ^ E_DEPRECATED);
to the top of
sudo vim lib/internal/Magento/Framework/Encryption/Crypt.php

@orlangur
Copy link
Contributor

@joshspivey,

I run 7.1 in production no problem

Only if you don't need to void invoice/credit memo :)

@ivokund
Copy link

ivokund commented Mar 17, 2017

PHP 7.1 has had already 4 stable releases. When can we expect PHP 7.1.x to be supported? Thanks

@ezestrajesh
Copy link

Just go app/etc/env.php and delete below code from there .
This is working for me . in PHP 7.1
'crypt' =>
array (
'key' => 'bbf59cf9183348767c1b23d8fede4383',
),

@southerncomputer
Copy link
Contributor

That sounds like a bad idea! what happens with no crypt key?

@rsecor
Copy link

rsecor commented Apr 13, 2017

Any ETA on PHP 7.1 with Magento 2?

@orlangur
Copy link
Contributor

orlangur commented May 3, 2017

mcrypt_* calls are suppressed the right way in develop already: https://github.com/magento/magento2/blob/develop/lib/internal/Magento/Framework/Encryption/Crypt.php#L59
(unlike the #5880 (comment) approach).

@rsecor, it seems to be there ;)

@rsecor
Copy link

rsecor commented May 3, 2017

@orlangur, Thanks for the heads up...
It looks like it was changed about a week ago.
I will start taking another look to see how things go.

@maghamed
Copy link
Contributor

Any ETA on PHP 7.1 with Magento 2?

PHP 7.1 would be supported in Magento since Magento 2.2
And there wouldn't be support of PHP 7.1 in Magento 2.0 or 2.1

@gustavovo
Copy link

Hello!

Any idea how can i bypass the mcrypt prereq on 2.2 installation?

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

orlangur commented Nov 1, 2017

@gustavovo, GitHub is intended for bug reports, please use Magento Stack Exchange for questions. Once you posted a question just add a link here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests