Install mcrypt extension & libmcrypt.dll for PHP

What is mcrypt?

MCrypt is a replacement for the old crypt() package and crypt(1) command, with extensions. It allows developers to use a wide range of encryption functions, without making drastic changes to their code. It allows users to encrypt files or data streams without having to be cryptographers.

 

Why is this important?

1. PHPmyAdmin will show this error "Cannot load mcrypt extension. Please check your PHP configuration". Although error can be ignored, it is annoying.

2. When compliling PHP code you may require encryption and your pages will not display correctly on your testing server when encryption is used without mcrypt. eg login pages

 

NOTE: This install was completed on Windows 7 Ultimate 64 bit and works for 32 bit systems.

 

STEP 1

Open Control Panel

 

 

STEP 2

Open Programs and Features

 

STEP 3

Scroll down to PHP 5.X.XX

 

STEP 4

Highlight PHP 5.X.XX and click Change

 

STEP 5

Then Click Next

 

STEP 6

Click Change

 

STEP 7

Select option IIS FastCGI then Next

 

STEP 8

Click on the '+' to view Extensions

 

STEP 9

Scroll down to Mcrypt

 

STEP 10

Click Mcrypt and select 'Will be installed on local hard drive'

 

STEP 11

Click Next

 

STEP 12

Click 'Change'

 

STEP 13

You will see this window briefly

 

STEP 14

Click Finish

 

Congratulations! - you have now Installed mcrypt extension for PHP.

 

The error in PHPMyAdim "Cannot load mcrypt extension. Please check your PHP configuration" has gone.

 

A new file 'libmcrypt.dll' has been placed into you PHP program file and your Ext folder in PHP.

 

The following will also appear uncommented in your PHP.ini configuration, usually at the bottom.

[PHP_MCRYPT]
extension=php_mcrypt.dll

 

This is the only method that should be used to install mcrypt as it will install the correct version for your PHP version.

 

DO NOT download and intall it from the internet as it is unlikely to work.

 

 

 

 

Related Articles

 

Disable User Account Control (UAC) on Windows 7

 

Install and Configure IIS 7.5 & PHP & FastCGI on Windows 7

 

Install MySQL on IIS 7.5 on Windows 7

 

Install PHPMyAdmin on IIS 7.5 on Windows 7