Enable Mcrypt on PHP Install

40,856

Solution 1

I figured it out through a combination of tutorials:

  1. Added libmcrypt.dll to the System32 folder
  2. Uncommnted the include_path var in php.ini and added the path to ext
  3. Restarted Apache

Thankfully, no system reboot was required. Whether one or both of the above was necessary, it doesn't matter now that mcrypt is functioning. Thanks, everyone.

Solution 2

The other answers has the necessary steps about check the \ext\php_mcrypt.dll exists and enable the extension in php.ini. Beside this, you need to copy {Your-PHP-Root}\libmcrypt.dll to {Your-Apache-Root}\bin, then restart apache, the problem should be solved.

Share:
40,856
justacoder
Author by

justacoder

CF and PHP code monkey!

Updated on July 09, 2022

Comments

  • justacoder
    justacoder almost 2 years

    I have PHP 5.2.14 installed on a Windows box (installed via .msi) using Apache 2.2.16. The install came with both ext/php_mcrypt.dll and libmcrypt.dll but when I uncommented extension=php_mcrypt.dll in php.ini and restarted Apache it doesn't enable. phpinfo() shows nothing for it. What am I missing?

    UPDATE:

    I looked at my error logs and it spit this out to me:
    PHP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP5\ext\php_mcrypt.dll' - The specified module could not be found.\r\n in Unknown on line 0

    I read up a bit about this and I don't have any php dll's stored in the windows32/ folder, so I'm confused.