If you have installed PHP through apt-get
then find the mcrypt extension you are using either for apache by using
$ locate *mcrypt.ini
/etc/php5/apache2/conf.d/20-mcrypt.ini
/etc/php5/cli/conf.d/20-mcrypt.ini
/etc/php5/fpm/conf.d/20-mcrypt.ini
/etc/php5/mods-available/mcrypt.ini
/usr/share/php5/mcrypt/mcrypt.ini
/var/lib/ucf/cache/:etc:php5:mods-available:mcrypt.ini
go into the directory that you have your extension in
cd /etc/php5/apache2/conf.d/20-mcrypt.ini
and you will probably find there is a symlink to the mcrypt extension in the mods-available directory. If that's the case all you have to do is cd into the /etc/php5/cli/conf.d
directory
and create a similar symlink
cd /etc/php5/cli/conf.d
sudo ln -s ../../mods-available/mcrypt.ini ./
then restart php maybe with sudo service php5 restart
That should work
mcrypt
and Uncomment or add themcrypt
extension inphp.ini
file – Sougata Bose