Cannot load mcrypt extension. Please check your PHP configuration. (Solved)

When you finish installing phpMyAdmin on your windows OS, you may see this error msg below your phpMyAdmin screen after you logging in. I try googling for solution and none of them working on my windows system. But i get a conclusion from those articles i read and Yes i get the solution.
First there aren’t MySQL or PhpMyAdmin prolems. it’s PHP problem that can’t load this extension. Now you can open your php initialization file “php.ini” it’s ono your php installation directory (i.e c:\program files\php\). You must make sure that php extension directory is set up at the right place, on my pc it’s on”C:\Program Files\PHP\ext”. then you can open comment on this line “;extension=php_mcrypt.dll”.

Until this step actualy i have done the right things and surely this must work, after i restart my Apache Server this isn’t progress at all . I try googling and googling but none of them solved my problem until i read article on install mysql that must put the libray on to the windows directory than i realize this is must be the solution.

I put the library on windows system (c:\windows\) not the php_mcrypt.dll but libmcrypt.dll (mine in c:\program files\php\) , restart the Apache and ….. this is SOLVED…

Phew after a night and a half day ….


26 Responses to “Cannot load mcrypt extension. Please check your PHP configuration. (Solved)”

  1. y2kServer Says:

    thanks for your help .

  2. Jamie Says:

    I can’t believe it. You’ve solved my problem. They don’t make things easy for us do they? LOL

  3. Anon Says:

    Thank you! I’ve been searching for hours but this totally worked!

  4. Olivier Says:

    Had the same problem.
    This helped me a lot.

    I had both php_mcrypt.dll and libmcrypt.dll under System32 as I tried first with php_mcrypt.dll and then putting libmcrypt.dll as it still didn’t work.
    After reading this I removed php_mcrypt.dll from that folder, restarted apache , and it works.


  5. Olivier Says:

    Well, it still didn’t work after all, better but not perfectly.

    I have removed them all from windows\system32. I have removed libmcrypt.dll, php_mcrypt.dll, libmysql.dll, php_mysql.dll, php_mysqli.dll as I tried different combination. I just made sure they were back as original in their respective folders, that is c:\apache64\php5 and c:\apache64\php5\ext in my case.

    All is in configuring php.ini properly, leaving it there under your php folder and going into Control Panel, System, Advanced System Settings, Environment Variables, System variables, Path, Edit and added at the end of the line “;C:\apache64\php5\” without the ” characters.

    In, I made sure the extensions I needed were uncommented, they are “extension=php_mcrypt.dll”, “extension=php_msql.dll”, “extension=php_mysqli.dll” for Mysql5 with PHP5, “extension=php_bz2.dll
    ” for compression (needed with phpMyAdmin for instance), “extension=php_mbstring.dll” for phpMyAdmin, “extension=php_zip.dll” for phpMyadmin.
    In php.ini still, “session.save_path = “C:/tmp”, creating the folder and making it share to everyone as it was coming back all the time as read only on my Vista system. Needed also for phpMyadmin 3.1.1 is to create a folder config and make it readable. See http:\\localhost\phpMyAdmin\setup for more info.

    In php.ini, “mysqli.default_port = 3306” and “mysqli.default_host = localhost” as well as “mysql.default_port = 3306” and “mysql.default_host = localhost”. Correct me on this latest if I am wrong but that’s how it is on my seemingly working web server at this stage.

    Hope this will spare you a night of digging.

  6. hermawanpurwanto Says:

    well Olivier if it’s better than what message / error still appear when you run phpMyAdmin?

  7. Richard Says:

    I had the exact same problem with the mcrypt error. My solution was the same as Olivier’s I think. The reason the System32 folder wants the dll’s is because it is in the System Path search list. Just adding a semicolon and “c:\php” (or whatever your php folder is called) to the list of folders that are in the Path fixes everything. You have to reboot Windows for it to take effect. Here are some steps for how to do this in detail:

  8. silverx10 Says:

    Outstanding, much obliged!

  9. Jean Says:


    Don’t comment that, it’s a missing plugin.
    Just run for debian:
    apt-get install php-mcrypt

    yum install php-mcrypt

    That will solve your problem 🙂

  10. David78737 Says:

    Thanks Oliver! You guys are all saints. I realized reading this that this PATH stuff is a holdover from the DOS days and the PATH was an issue every installed application needed to address.
    Final note, the syntax for the PATH string needs to include the final “\” as in “c:\php5\” but NOT “c:\php5” OR “c:\php5\ext\” (which would have the system looking for the extension file “php_mcrypt.dll” in a directory one level lower.)
    Now if I can just find that piece of paper with my database password on it….

  11. Andrea Says:

    Thanks!!!!!!!! I spent hours and hours with this issue! (K) (K) (K)
    I (L) U !!!

  12. Shane Says:

    Extremely grateful, thanks.

  13. hermawanpurwanto Says:

    happy this post can help all of us

  14. zepper Says:

    Thanks 😉

  15. webman2015 Says:

    Hey, thanks a lot. This worked great.

  16. Ope Says:

    THANKS A LOT!!!!

    Saved me hours/days !

    I think there should be a master PHP/MySQL/Apache Help WEB PAGE with all helps stuff like these!

  17. WouterT Says:

    After looking for a couple of hours, this was the solution.

  18. Exchange Says:


    Thans a lot:)

  19. DJH Says:

    Thanks alot..
    it magically worked for me.

  20. funtomas Says:

    works great!
    thanks a lot

  21. Behn Says:

    Very useful article, thanks for sharing.

  22. Tlangelani Mboweni Says:

    Thanks for sharing, it works… keep up the good work!

  23. Operaatoors Says:

    Thanks for this topic. It helpd remove this error.

  24. vwzombie Says:

    Thanks – you’re a star!

  25. Jean Says:

    It works for me thanks

  26. jmccc Says:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: