How to install the mcrypt modules on PHP?
I need to install the mcrypt extension on WAMPServer so that I can use IDEA encryption on passwords. I can't use any other type of encryption, because the large database I am interacting with already uses IDEA encryption on passwords.
I have done quite a bit of research on installing the mcrypt extension on PHP. I saw that there were 2 main steps:
- Install the extension
- Refer to the directory where the algorithms and modes are located in the php.ini file
Step 1 I have managed to complete successfully as it no longer gives the fatal error: "Call to undefined function mcrypt_encrypt..."
Step 2 is where I am having issues, because now when I call the mcrypt_encrypt function php returns the warning: "Warning: mcrypt_encrypt(): Module initialization failed..."
- I downloaded the mcrypt extension from: http://www.dlldll.com/php_mcrypt.dll_download.html
- I downloaded the mcrypt algorithms and modes from: http://sourceforge.net/projects/mcrypt/files/Libmcrypt/Production/libmcrypt-2.5.7.tar.gz/download
I placed the directory with all the algorithms and modes (libmcrypt) in the php extensions folder and then in php.ini I wrote these 2 lines:
mcrypt.algorithms_dir = "c:/wamp/bin/php/php5.4.3/ext/libmcrypt/modules/algorithms"
mcrypt.modes_dir = "c:/wamp/bin/php/php5.4.3/ext/libmcrypt/modules/modes"
I then restarted WAMPServer and it gave the warning: "PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.4.3/ext/php_mcrypt.dll' - The specified module could not be found."
I have been searching all over the web for tutorials on how to install the mcrypt extension and I can't find any! So I came to good old StackOverflow in hopes that someone might be able to help?