Check whether you have mcrypt module or not
php -m | grep mcrypt
If not present, install it
sudo apt-get install php7.0-mcrypt
Enable the module
sudo phpenmod mcrypt
Restart Apache and php-fpm
sudo service apache2 restart
sudo service php-fpm restart
Check whether you have mcrypt module or not
php -m | grep mcrypt
- If not present, install it
sudo apt-get install php7.0-mcrypt
- Enable the module
sudo phpenmod mcrypt
- Restart Apache and php-fpm
sudo service apache2 restart
sudo service php-fpm restart
There are chances that it may not work if you have two php installed in the system. One with Apace/php-fpm and one through CLI. In order to be sure that mcrypt is enabled. Creat a file testmcrypt.php in your root and with below code.
<?php
phpinfo();
Run the file your browser and check if you can see the mcrypt module in the page.