Fix php-mcrypt bug in Ubuntu 14.04

mcryptPHPUbuntu

 

This one liner will fix your php-mcrypt, the last command tests to ensure mcrypt is properly installed.

sudo ln -sf /etc/php5/conf.d/mcrypt.ini && sudo php5enmod mcrypt && sudo service apache2 restart && php -m | grep mcrypt 

 

Source:

https://bugs.launchpad.net/ubuntu/+source/php-mcrypt/+bug/1318021

 

This does solve it:

Check if mcrypt is not enabled:

root@prod:/etc/php5/mods-available# php -m | grep mcrypt

Symlinks to the wrong mcrypt.ini as a workaround:

root@prod:/etc/php5/mods-available# ln -sf /etc/php5/conf.d/mcrypt.ini .

Enabled the mcrypt mod:

root@prod:/etc/php5/mods-available# php5enmod mcrypt

Check if it was enabled:

root@prod:/etc/php5/mods-available# php -m | grep mcrypt

Restart services:

root@prod:/etc/php5/mods-available# service apache2 restart

php -m | grep mcrypt

 

Leave a Reply