Install PHP mcrypt on UNIX server
In this quick tip I’ll show you how to install the PHP extensionmcrypt. This is needed for Magento to run properly otherwise you’ll get an error like:
[cc type=”text” escaped=”true”]Fatal error: Call to undefined function mcrypt_create_iv() in lib/Varien/Crypt/Mcrypt.php on line 64[/cc]
Install mcrypt on Ubuntu
[cc type=”text” escaped=”true”]# apt-get install php5-mcrypt
# /etc/init.d/apache2 restart[/cc]
Install mcrypt on CentOS
[cc type=”bash” escaped=”true”]## 64 bit version
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
## 32 bit version
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# yum install php5-mcrypt[/cc]
That’s all but if you are running Windows and you already have the mcrypt DLL on your machine all you have to do is add the following line in your php.ini file:
[cc type=”text” escaped=”true”]extension=php_mcrypt.dll[/cc]
This article helped me a lot. Many thanks!