Have Fedora, but no mcrypt functionality for PHP?

Easy fix, despite the official line from PHP which says you need to recompile PHP –with-mcrypt.

I’ll caveat this by stating I’m using Fedora Core 7…

1) At the terminal, su root – you are now going to yum, not ./configure, make, and make install…

2) yum install mcrypt – this will get you libmcrypt, mhash, and mcrypt

3) yum install php-mcrypt – this will get you the functionality within PHP

Uh…done (without hassles).


Tassos says:


It worked for me on Godaddy Host. I was trying to install magento commerce and had problems with mcrypt.


Michael Gracie says:

No prob! I was using GoDaddy too – I guess it is a host thing.

D.J. says:

Very helpful post . I haven’t used a Yum or RPM command in almost 4 years. This post was the immediate answer.

I just helped a friend who needed mcrypt for a ( just as the others said ) magneto install on a GoDaddy host.

Just wanted to remind people:

You shouldn’t have to change any configs or ini files to get mcrypt going.

After these commands complete the installation , restart your web server and magneto will pass the mcrypt test and phpinfo() will be updated.

Thanks. Although it does seem the explanation is somewhat GoDaddy specific – hopefully it is close for those using other hosts’ Linux distros.

Jean jack says:

It works for me on Fedora 7. Thank you.
Установил функционал mcrypt для PHP. Отлично сработало. Спасибо.

Thanks for your article. I am a programmer & not a administrator. But could install mcrypt with the help of your article. That was a great experience.

Thanks once again.

Ilango Chokalingam

@Jean/IIando – Glad it worked out for you folks!

Sid Mizard says:

After more than 12 hours of investigate and install many things you give me the answer, thanks for your help!!!

Jeremy Quaid says:

Great – saved me a load of messing about.

Sid/Jeremy – No problem!

Clifford Meyer says:

Great! Most helpful. I’m using a virtual dedicated service at GoDaddy with Fedora 7 and this has saved me so much hassle. I’m about to install MODx and mcrypt is part of the requirements. Also, the latest version of phpMyAdmin requires it. So, there is such a thing as a free lunch.

Ian says:

Michael, i want to try this our on my fedora/php5 server but want to know what the worst case scenario would be if it fails. Would I lose sites?

Ian – Probably not. A failure would likely be an install failure versus, say, an Apache failure. However, trying on a test box is always the preferred approach. And always backup first.

Ian says:

dont have a test box just a live production server with some support software I installed but needs to have mcrypt to run, I guess if it does not install thats the worst , just dont want sites to fail. Well I’ll give it a go and see what happens.
Thanks Michael.

Ian says:

Hi Michael
I finally got round to trying this but the command line says ‘yum: command not found’.
Is there a work around?

Hi Ian – yum might not be installed. Read this: http://www.webmo.net/support/yum_repository.html

Also, make sure you get the right RPMs for your Fedora version.

Claudius says:

Great article! Thanks for your help.
pqp, do not forget to restart apache 😉

Siva says:

hi, great article. the installation works good…thanks!!!!

John says:

Awesome thanks to u..laravel started workinnn….

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.