However, if you’re like me (and you don’t want to wait) there is just one file that you need to patch. (I tried disabling the DEPRECATED warnings, however in developer mode it seems that Magento re-enables these).

The file in question is vendor/magento/framework/Encryption/Crypt.php. You need to go through the file and add the @ sign before any of the mcrypt calls (this instructs the php interpreter to suppress warnings generated from these lines).

For example:

$this->_handle = mcrypt_module_open($cipher, '', $mode, '');


$this->_handle = @mcrypt_module_open($cipher, '', $mode, '');

  • 2
    What about when you do composer update or install? All those changes are gone. – Domeglic Nov 9 '17 at 10:22
  • 3
    1) Not a question. 2) Bad solution. 3) Your magento version doesn't work with php 7.1 , change to php 7.0 or 5.6 to make it work. 4) Don't override the errors output with @, you are killing flies with a gun. – Marcos Pérez Gude Nov 9 '17 at 16:13

You can update to magento 2.2 which officialy supports php 7.1 (see http://devdocs.magento.com/guides/v2.2/release-notes/ReleaseNotes2.2.0CE.html )

Also editing core files is never! a good idea, as this makes your magento installation unmaintainable.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.