Friday, March 12, 2010

Can't load PHP's mcrypt extension?

After installing MySQL and PHP, both were working correctly and the only thing missing was to install phpMyAdmin. After downloading and unzipping the installation file I try to access the application through the browser and I get this error:

"Cannot load mcrypt extension"

This can be solved quite easily:

  1. Open your php.ini file (e.g. c://php5/php.ini or c://windows/php.ini)
  2. Find and uncomment "extension=php_mcrypt.dll", save the file.
  3. Copy "libmcrypt.dll" from your php folder to "c://windows"
  4. Restart the server
That's it!