We were migrating a Magento development website over to it’s live environment the other day and came across the following errors when accessing a payment gateway:

Notice: Use of undefined constant MCRYPT_BLOWFISH – assumed ‘MCRYPT_BLOWFISH’ in /lib/Varien/Crypt/Mcrypt.php on line 56

Notice: Use of undefined constant MCRYPT_MODE_ECB – assumed ‘MCRYPT_MODE_ECB’ in /lib/Varien/Crypt/Mcrypt.php on line 60

To fix this you need to install PHP Mcrypt. On Centos6 you can usually use the following command:

  • yum install php-mcrypt*

You may find that the EPEL repository doesn’t contain the relevant install files, in which case you will have to add new repos that contain the php-mcrypt install as follows:

  • wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
  • wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
  • sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
  • yum update
  • yum install php-mcrypt*

And then finally, service httpd restart in order to restart your web server.

Magento 2.4.7 is here!
David Pratt

Magento 2.4.7 Has Arrived!

Magento 2.4.7 is set to land, with the latest release due to be launched on Tuesday the 9th of April 2024. The latest updates sees over 150 performance and security fixes as well as platform enhancements and upgrades.
Read More »
DTF Digital