The mcrypt extension is missing. Please check your PHP configuration
Asked Answered
S

7

50

I just followed the tutorial located at https://www.digitalocean.com/community/articles/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu while fixing multiple other errors that I came across along the way and I'm stuck with one last error. When I log in to phpMyAdmin, there's a huge red error at the bottom saying "The mcrypt extension is missing. Please check your PHP configuration.". I installed everything listed in the tutorial on Ubuntu 13.10 via putty.

Susquehanna answered 28/3, 2014 at 19:32 Comment(0)
S
153

Try this:

sudo apt-get install php5-mcrypt
sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available
sudo php5enmod mcrypt 
sudo service apache2 restart
Sparrowgrass answered 29/3, 2014 at 10:59 Comment(10)
Funny I just got this today reinstalling the lamp stack. Thanks!Lanceted
After fresh ubuntu 14.04 and LAMP install, all I needed to do was add the mod: sudo php5enmod mcrypt. cheers.Sergio
I got "ln: failed to create symbolic link /etc/php5/mods-available/mcrypt.ini: File exists" when executing second line. It seems its already done for you in the first step.Odaodab
@BasilMusa thanks; which Ubuntu version are you running?Sparrowgrass
Second line is too important, solve my issue thanks. +1Katherine
I followed every instruction here and in other places but in vain. ubuntu 14.04.3 -- PHP 5.5.9-1ubuntu4.14 -- nginx/1.8.1 -- Server version: 5.7.10 - MySQL -- Database client version: libmysql - 5.5.47 -- phpMyAdmin Version: 4.0.10deb1....anyone have an idea?Sergio
Still happening, and the server itself is not a dependency ? (Probably due to the MariaDB etc. ambiguity. Purging marks Apache2 as no longer required ?Pronation
@Pronation Which phpMyAdmin version?Sparrowgrass
Apologies, my versions always come from Ubuntu repositories, currently Trusty, more specifically this version came from the aws sources for eu-west-1. (these are not strictly mirrors and they are not identical from region to region). So 4:4.0.10-1 but this is likely a package issue then.Pronation
Last two lines worked for me. Ubuntu server 14.04.4.Cruz
V
25

I've followed the exact tutorial with OP on digital ocean. The only steps that missing is to

sudo php5enmod mcrypt
sudo service apache2 restart 

and the error gone after restarting the apache service

Vaules answered 29/7, 2014 at 15:52 Comment(1)
What those two command do is this: the 1st line is enabling module named 'mcrypt', and then restart apache2 to update the config. You can see the enabled module from /etc/apache2/mods-available. Enjoy LAMP life :)Dowager
A
6

Adding this answer for anyone who encounters this issue with Linux Mint 17.

Just installed a LAMP stack on and was getting this error. The mycrpt.ini file was already inst the /etc/php5/mods-available directory. All that needed to be done was to run the command to enable the module:

sudo php5enmod mcrypt

Restart apache after that and you'll be good to go.

Analyzer answered 27/7, 2014 at 13:55 Comment(0)
O
1

I just stuffed a symbolic link into the Apache portion of php configuration. Platform: Xubuntu 14.04 LTS.

Details:

  1. cd /etc/php5/apache2/conf.d
  2. sudo ln -s ../../mods-available/mcrypt.ini 20-mcrypt.ini
  3. ls -l to see if the new link is there
  4. sudo apache2ctl restart

HTH.

Oberland answered 10/5, 2014 at 19:50 Comment(0)
F
1

For those using a LEMP stack (nginx & php5-fpm), this is the solution

apt-get install php5-mcrypt
php5enmod mcrypt
service php5-fpm restart
service nginx restart

(run each with sudo, naturally)

Fayina answered 18/7, 2015 at 11:53 Comment(3)
am still stuck with this on phpmyadmin...any ideas??Sergio
@Sergio Stuck with what, more precisely?Fayina
Thanks! Important critical steps for nginx stacks!Neva
O
0

Try this:

sudo apt-get install mcrypt php5-mcrypt; php5enmod mcrypt; service apache2 restart
Octosyllable answered 3/9, 2014 at 15:32 Comment(0)
R
0

I am on a Mac OS X Yosemite using Terminal, and I fix this error

the requested PHP extension mcrypt is missing from your system

by running the following commands :

brew update
brew upgrade
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
brew install php54-mcrypt
Runty answered 21/5, 2015 at 18:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.