Ubuntu – Mcrypt extension is missing in 14.04 server for thesql


The php mcrypt extension on ubuntu 14.04 shows that it is installed properly, but phpmyadmin says:

 The mcrypt extension is missing. Please check your PHP configuration.

My current php config is here. If you need anymore information, please contact me through the comments.

$ sudo apt-get install php5-mcrypt
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    php5-mcrypt is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Best Answer

Try this:

sudo updatedb 
locate mcrypt.ini

Should show it located at /etc/php5/mods-available

locate mcrypt.so

Edit mcrypt.ini and change extension to match the path to mcrypt.so, example:


Now this:

sudo php5enmod mcrypt - (optional since its already enabled during phpmyadmin setup)

Verify that new files exists here (they should be auto created from the issue above)

ls -al /etc/php5/cli/conf.d/20-mcrypt.ini
ls -al /etc/php5/apache2/conf.d/20-mcrypt.ini

Otherwise do the following

Create symbol links now

sudo ln -s /etc/php5/mods-available/mcrypt.ini /etc/php5/cli/conf.d/20-mcrypt.ini
sudo ln -s /etc/php5/mods-available/mcrypt.ini /etc/php5/apache2/conf.d/20-mcrypt.ini

Restart Apache

sudo service apache2 restart

Restart php5 or php5-fpm

sudo service php5 restart