Install PHP mcrypt on UNIX server

Install PHP mcrypt linuxIn 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
## 32 bit version
# rpm -Uvh
# 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]


Just a guy with strong interest in PHP and Web technologies

Tagged with: ,
One comment on “Install PHP mcrypt on UNIX server
  1. Sorin says:

    This article helped me a lot. Many thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.