WebDevelopersNotes logo

home-icon Home / PHP / phpMyAdmin error Cannot load mcrypt extension: problem and solution

phpMyAdmin error Cannot load mcrypt extension: problem and solution

phpMyAdmin error Cannot load mcrypt extension: problem and solution

I was trying to install phpMyAdmin on a Windows 7 computer and thought it would be a walk in the park. After all, how wrong could I go with simple unpacking of the zip file to the document root?

Cannot load mcrypt extension error message in the phpMyAdmin login page

Though I was ‘partly’ right (the process was as easy as I had assumed), a “Cannot load mcrypt extension” error message greeted me when I loaded the phpMyAdmin login page in the web browser – see image below. Below is the solution to this problem.

Sponsored Links

The “Cannot load mcrypt extension” error is not because of phpMyAdmin, MySQL or Apache. It’s a PHP configuration issue and involves editing the php.ini file. This file is located in the folder in which you had installed PHP. This would be C:/PHP if you’ve followed my instructions on how to install PHP on Windows 7.

Load the extension to get rid of “Cannot load mcrypt extension” error message

The quickest way to solve this problem and get rid of the Cannot load mcrypt extension error message is to open php.ini in Notepad and load mcrypt.dll. Thus,

  1. Open php.ini in Notepad.
  2. Locate ;extension=php_mbstring.dll and ;extension=php_mcrypt.dll and remove the preceding semi-colons. (Thanks, tsauraik).
  3. Save the PHP configuration file.
  4. Since important settings have been changed, you would have to restart the web browser. For Apache, click on its icon in the Notification Area (System Tray) and choose Apache 2.2 -> Restart.

The “Cannot load mcrypt extension” error message would now be removed from the phpMyAdmin login page.

Sponsored Links

Your comments
Star icon IMPORTANT Have a question / problem? Click here to ask an expert.

  • Het on April 3rd, 2011 12:38 am

    Can’t get rid of the “Cannot load mycrypt extension….” error. I followed the steps that you gave but still getting the same error… What could be the problem? Thank you.

  • Manish on April 3rd, 2011 3:54 pm

    @Het, The above solution worked for me. Maybe you have to change other parameters in the php.ini file.

  • tsauraik on April 5th, 2011 1:03 pm

    @Het

    In addition to above also search for ‘ ;extension=php_mcrypt.dll’ in php.ini file and remove the semicolons. Restart apache. If it does not work restart your computer and the error should be gone.
    I was having a problem similar to yours and I was able to get rid of the error message after removing the semicolons and restarting the computer. I am not a computer whiz so I can not explain why this is so.

  • Het on April 9th, 2011 3:07 am

    @manish: Other parameters? What are they? I did all the things that the instruction said… Can it be due to other version of phpmyadmin?because the version he suggested is not anywhere. Thanks

  • Het on April 9th, 2011 3:11 am

    @tsauraik
    I tried that also…followed all the Instructions but did not work.

  • Manish on April 10th, 2011 12:51 pm

    @Het, I don’t think it’s an issue with the version.

  • Susan on June 1st, 2011 8:43 pm

    I’m getting an error: The mysql extension is missing. Please check your PHP configuration.

    But I have php_mysql.dll and php_mysqli.dll in C:/PHP/ext . Any ideas why I would get this error? I restarted the Apache server and then tried a system reboot, but it still is not working. Could it be a permissions thing?

    Thanks

  • Susan on June 1st, 2011 8:45 pm

    I also modified the php.ini file by taking out the semicolons so that they aren’t commented out.

  • Favorlock on July 20th, 2011 10:24 am

    Unfortunately this did not solve the mcrypt error for me, however, I did find a solution elsewhere. You also need to install the following extensions:

    extension=php_gd2.dll

    It could well be version related for all I know.

  • Maw on January 26th, 2012 7:56 pm

    (I) Remove comment in php.ini config file: –

    ;extension=php_mcrypt.dll’ in php.ini file
    extension=php_mcrypt.dll’ in php.ini file

    (II) Copy php_mcrypt.dll (in phpext folder) into: –
    C:windowssystem32

    (iii) Reboot computer

If it's on the Internet, it must be true.

Sponsored Links

Tips

How do I view a deleted web page?
Is there a way to view a deleted web page - one that is no longer available? Yes there is and the solution is quite simple. [more...]

Fact

The Games category on the Apple App Store has the largest number of apps for iOS. [more...]

We use cookies to give you the best possible website experience. By using WebDevelopersNotes.com, you agree to our Privacy Policy