1

I've got a Magento 1.9.3.7 version and updated php5.4 to php7.1. Now some of my unittest fail with the error: "Deprecated functionality: Function mcrypt_module_open() is deprecated in /path/to/deprecated/method". Now I want to replace mcrypt with openssl. How is the general procedure and where is the point where I magento say which encryption to use.

My consideration is the following: I create a new file named "Openssl.php" in the folder "app/code/local/Varien/Crypt/" now i say to Magento it should use openssl instead of mcrypt (but I don't know where). Is that the right approach? For examples, I would be grateful.

Thank you in advance

TheGhostex
  • 21
  • 6
  • Maganto 1.* has no [support](http://docs.magento.com/m1/ce/user_guide/magento/system-requirements.html) for PHP 7.*. There are some alternatives like: http://inchoo.net/magento/its-alive/ – Wouter075 Dec 18 '17 at 13:45
  • See [Use openssl_encrypt to replace Mcrypt for 3DES-ECB encryption](http://stackoverflow.com/q/39467008/608639), [Can't decrypt using pgcrypto from AES-256-CBC but AES-128-CBC is OK](http://stackoverflow.com/q/43550818/608639), [MCrypt rijndael-128 to OpenSSL aes-128-ecb conversion](http://stackoverflow.com/q/45218465/608639), etc. Also see [Upgrading my encryption library from Mcrypt to OpenSSL](http://stackoverflow.com/q/43329513), [Replace Mcrypt with OpenSSL](http://stackoverflow.com/q/9993909/608639) and [Preparing for removal of Mcrypt in PHP 7.2](http://stackoverflow.com/q/42696657) – jww Dec 18 '17 at 16:49

1 Answers1

1

In fact, better and easiest solution is to install phpseclib/mcrypt_compat which is PHP 5.x/7.x polyfill for mcrypt extension.

Install this extention via composer and disable mcrypt.

Kaimin
  • 13
  • 2