$ sudo mv /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/ $ sudo php5enmod mcrypt $ sudo service apache2 restartWhat “php5enmod” does is simply enabling a PHP5 module by creating a symbolic link from conf.d directory to the real config file under “mods-available”. So, after we run “php5enmod mcrypt” command, the following files will be created:
/etc/php5/apache2/20-mcrypt.ini /etc/php5/cli/20-mcrypt.iniwhich are symlinks to
/etc/php5/mods-available/mcrypt.iniThe prefix “20” is the priority of module, and the default is 20 when you run “php5enmod” command. If you don’t need the mcrypt module for the command line, you can simply remove the symlink under /etc/php5/cli/20-mcrypt.ini. Hope this helps.