Friday, October 18, 2013

Ubuntu 13.10 PHPMyAdmin - mcrypt extension is missing

I am setting up a new Drupal installation with LAMP on Ubuntu (Saucy Salamander - 13.10). Installing the LAMP server and PHPMyAdmin was like a breeze. I just needed the following command:
sudo apt-get install lamp-server^ phpmyadmin
Once I logged into the fresh PHPMyAdmin interface, I realized that "mcrypt" module is missing in default Ubuntu installation. The error I found at the bottom of the PHPMyAdmin page simply page said:

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

After doing a quick "apt-cache search", I found the right php5-mcrypt module that I was missing. So I issued:
sudo apt-get install php5-mcrypt
sudo service apache2 restart
Interestingly, even after this I had the "mcrypt missing" error. So I took a quick look inside my /etc/php5/ directory and found the "mcrypt.ini" inside /etc/php5/conf.d. Now for apache2 PHP5 module, the configuration files are located inside /etc/php5/apache2/conf.d (not in /etc/php5/conf.d). So I realized that although mcrypt was installed for PHP5, it was not being loaded fro Apache.

So the fix was as shown below. Basically I am just creating a symlink for mcrypt.ini inside PHP5's Apache configuration directory.
cd /etc/php5/apache2/conf.d
sudo ln -s ../../conf.d/mcrypt.ini 30-mcrypt.ini
sudo service apache2 restart
 Hope you find it useful too!

11 comments:

Anonymous said...

That helped me also on 12.04. Thank you!

Anonymous said...

Basically, going to Ubuntu 13.10 is a pain. Everything in Apache and PHP gets unconfigured. This helped me a lot!

Unknown said...

one error down

thanks much

teh great lizard king said...

it still appears with this ubuntu version

ZubiDuubi said...

phpmyadmin-for-all-languages
nice work :)

Странник said...

thanks much

Anonymous said...

worked link a charm thanks

Eduardo Beck said...

Worked very well. Thanks

Atm said...

شكرا لك

Unknown said...

PHP modules can be enabled just like in Apache2. To enable, run:

sudo php5enmod mcrypt

It basically does what you are doing above (I.e. creating a symlink) but in a manner familiar to ubuntu (and I suspect other debian distros).

eduardo said...

Thanks for the explanation Hayden. Worked!

Post a Comment