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]

It's only fair to share...Buffer this pageShare on Facebook0Tweet about this on TwitterShare on Google+0Share on LinkedIn0Share on Reddit0Pin on Pinterest0Email this to someone

Just a guy with strong interest in PHP and Web technologies

Posted in Apache, CentOS, PHP, Servers, Small Tips 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 *