Notice: Use of undefined constant MCRYPT_BLOWFISH
Of late there have been a noticeable amount of support requests on freelance websites and on the Magento forums regarding the MCRYPT_BLOWFISH error some users have seenon both Linux and Microsoft servers. Some are effected after server moves and others suggest it is random. Here we are going to take a quick look at the error, why it has happened and how to resolve it.
The reason for the error is actually quite simple and the fix is usually not a massive problem either unless your server is running old or legacy software. The error is caused when PHP cannot find the php-mcrypt module and or the libmcrypt libary.
How to install php-mcrypt and libmcrypt on my Linux server?
First find out which version of PHP you are running and also find out your version of Linux. Once you know your version of Linux you need to lookup how to install programs on there. Usually this will be done with the RPM command, apt-get command or yum install command etc. Then at the command line type (without the hash and replacing apt-get with whatever you installing is, of course) ...
# apt-get install php5-mcrypt
or if you are running php 4 ..
# apt-get install php4-mcrypt
Also if you don't have the library we mentioned ...
# apt-get install libmcrypt
Once you have installed those you will need to restart apache to get them to work. That should be it! If you are having troubles with this then post a comment below and let us know your system specs, we will do our best to help.
How to install php-mcrypt and libmcrypt on my Windows server?
Download libmcrypt.dll from php.net and place it in your PHP directory on your server. This is the directory that usually holds the PHP configuration files and so forth. Now open up php.ini (usually in the same directory, if not then do a Windows search for it) and find the line...
# extension=php_mcrypt.dll
Remove the hash '#' and restart your server and you should be good to go.
1 comment
http://www.centos.org/modules/newbb/viewtopic.php?topic_id=16393
AFAIK not yet properly implemented on CentOS 5.2.6, although http://www.fedorajunkies.com/index.php/PHP offers a 5.2.6 rpm ... didn't try yet
