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.

21 Replies to “phyMyAdmin, mcrypt, and Centos 6: “mcrypt extension is missing” solved”

  1. 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!!

    1. 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!!!

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

  2. you are correct the file is wrongly created.

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

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

  4. 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!

  5. Like everyone else on this page has said, “Thank you for your timely and hassle free phpmyadmin fix.” If we did not have the Internet to help each other solve tech problems, we all would be jumping off roofs in frustration. LOL

  6. Pingback: Install php-mcrypt on CentOS 6 - QuestionFocus

Comments are closed.