MAGENTO 2 & PHP 7.1 FIX: FUNCTION MCYRPT_MODULE_OPEN() IS DEPRECATED
While migrating my website to a new server running Magento 2 and PHP 7.1. I ran into this issue: Function mcyrpt_module_open() is deprecated
And I tried this solution, it worked!!!
I needed to do this in about 7 places in the file below to add @ symbol to sort this out.
Magento/Framework/Encryption/Crypt.php
Dont know the line number of the code? Dont worry. Just use the command below:
php bin/magento cache:flush
That gives the exact line number to fix the code.
For Example:
[Exception]
Deprecated Functionality: Function mcrypt_module_open() is deprecated in
/home/mageext1/public_html/lib/internal/Magento/Framework/Encryption/Crypt.php on line 54
Deprecated Functionality: Function mcrypt_generic_deinit() is deprecated in
/home/mageext1/public_html/lib/internal/Magento/Framework/Encryption/Crypt.php on line 93
Helpful solution when you are migrating the site to a new server or upgrading Magento.