Question

MCrypt extension required to run Craft CMS

I’m getting the following error on https://ginaphillips.net/:

Can’t run Craft CMS :(

Your server doesn’t meet the following requirements to run Craft CMS:

    The Mcrypt extension is required.

Please talk to your host/IT department about upgrading your server.

I was on PHP 7.3, have upgraded to PHP 7.4, but still getting the same error.

How do I fix this?

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there @drr1000,

You would need to manually install MCrypt using pecl. To install pecl you need to install the PHP Extension and Application Repository or PEAR for short:

  1. sudo apt install php-pear

You might also have to install the PHP Dev tools:

  1. sudo apt install php-dev

Then we would want to go ahead and install this package here. To do that, just run:

  1. sudo pecl install mcrypt-1.0.3

Finally, make sure that you enable the new PHP extension by adding the following line to your php.ini:

extension=mcrypt.so

If you are running PHP FPM make sure to restart it after the change to your php.ini file.

Hope that this helps. Regards, Bobby