phyMyAdmin, mcrypt, and Centos 6: "mcrypt extension is missing" solved

Installing a current version of phyMyAdmin on Centos 6 turned out to be a grand pain.   First, it turns out there are two packages in the rpmforge repo, "phymyadmin" and "phpMyAdmin", resulting in installations of version 2 and 3, respectively.

Once past that, phpMyAdmin reports "Cannot load mcrypt extension. Please check your PHP configuration". Well, that should be easy to fix.  Just a quick "yum install php-mcrypt".  Nope.  After digging around for a while, installing, uninstalling, rebooting, etc, I checked the the file /etc/php.d/mcrypt.ini.

Its contents were
; Enable mcrypt extension module

This is incorrect. I changed it to 

; Enable mcrypt extension module

then restarted httpd and the problem went away.  It appears that the php-mcrypt rpm, at least as of php-mcrypt-5.3.3-1.el6.rf.i686, incorrectly creates the mcrypt.ini file.



I was bitten by this bug in mid March and could not fix it other than to use yum to backout the upgrade.

Thanks for this!!

This post solved a problem I've been chasing today (installing phpmyadmin on Centos 6.4 -- and being new to both). You help is much appreciated, thank you!!!

Perfect. You're a champion! I can't believe this bug has existed, unfixed, for so long. Thanks so much.

you are correct the file is wrongly created.

thank you very much for your tip it worked like a charm.

Fantastic post. You did an excellent job analyzing the problem and sharing your fix. This is what makes the Linux community great!

That was starting to get frustrating. Thanks for the tip worked perfectly for me.

It worked like a charm. It took me about 5 minutes from installing mcrypt to resolving the issue with your help.

Thanks!  I'm happy to have helped.

It works. 10000x tnx :)

Dont Work

Super, got this sorted instantly - thanks!

Dead on target!
Thank you very much. I had been banging my head for over 3 hours on this.

Спасибо брат!

To install mcrypt on centos 6 for phpmyadmin, you will need to install the EPEL repo on your server from

# rpm -Uvh


then use yum command to install the mcrypt package
# yum install php-mcrypt

I applaud your steadfastness in tracking this down. I was going nuts trying to figure out why the script would keep throwing this error - then I opened that mcrypt.ini file and sure enough, it has the wrong entry. Changing it completely solved the issue. Great work!