How to install mcrypt modules in PHP?
I need to install the mcrypt extension on WAMPServer so that I can use IDEA encryption for passwords. I cannot use any other type of encryption, because the large database I am interacting with already uses IDEA encryption for passwords.
I have done quite a bit of research on installing the mcrypt extension in PHP. I saw that there were two main steps:
- Install extension
- Refer to the directory in which the algorithms and modes are in the php.ini file.
Step 1 I was able to successfully complete the work, because it no longer gives a fatal error: "Call the undefined function mcrypt_encrypt ..."
Step 2 is a problem because now, when I call the mcrypt_encrypt function, php returns a warning: "Warning: mcrypt_encrypt (): Module initialization failed ..."
I put the directory with all the algorithms and modes (libmcrypt) in the php extensions folder, and then in php.ini I wrote these two 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"
Then I restarted WAMPServer and gave a warning: "PHP Startup: could not load the dynamic library c: /wamp/bin/php/php5.4.3/ext/php_mcrypt.dll" - the specified module was not found. "
I have searched all over the internet for tutorials on how to install the mcrypt extension, and I cannot find it! So, I came to the good old StackOverflow in the hope that someone could help?
source share