Mcrypt extension error after installing phpMyAdmin on IIS
If you install phpMyAdmin on IIS and get the error:
PROBLEM: cannot load mcrypt extension. please check your php configuration
This could be due to the extension being missing or that it is not listed correctly in php.ini file. Listed below are the instructions from around the web that I followed to get this working:
Try installing the extension using the installer:
- “If you used the PHP installer, go to Add/remove programs and reconfigure the PHP installation. During the process you’ll be asked what items to install. From the list choose PHP > Extensions. From the list of extensions choose which extension(s) you wish to install/use. Finish the installation by clicking next.
Restart IIS and the extensions you choose during installation should be available. Restart the relevant application pool(s) also.
Move libmcrypt.dll to system32 directory
- On Windows installations, for the dynamic extension (extension=php_mcrypt.dll) to load properly, you must copy libmcrypt.dll from your PHP root folder (e.g. C:PHP) to the following location:
With this done, the dynamic extension will load up just fine.
Double-check the extension_dir path listed in php.ini
Add the path to the extension directory to php.ini, if it is not already there. If it IS there, double-check the path to make sure it is correct for your installation. Make sure extension_dir sn’t listed again, farther down the page, with a different path. If you make any changes or corrections, restart both IIS and the application pool.
; Directory in which the loadable extensions (modules) reside. ;extension_dir = "./" extension_dir = "C:Program FilesPHPv5.2ext"
Double-check that php_mcrypt is listed in the ExtensionList area of php.ini.
Add the name to the list as shown below. Double check the spelling. Double-check that there is only one ExtensionList in the php.ini file. If you make any changes or corrections, restart both IIS and the application pool.
[ExtensionList] extension=php_mysql.dll extension=php_mysqli.dll extension=php_mbstring.dll extension=php_gd2.dll extension=php_gettext.dll extension=php_curl.dll extension=php_exif.dll extension=php_xmlrpc.dll extension=php_openssl.dll extension=php_soap.dll extension=php_pdo.dll extension=php_pdo_mysql.dll extension=php_pdo_sqlite.dll extension=php_zip.dll extension=php_imap.dll extension=php_tidy.dll extension=php_mcrypt.dll