Magento – Use of undefined constant MCRYPT_RIJNDAEL_256 – assumed ‘MCRYPT_RIJ NDAEL_256

magento-2.1mcrypt

I got an error when i execute this command

php bin/magento setup:upgrade &&
php bin/magento setup:di:compile &&
#php bin/magento setup:static-content:deploy &&
chown -R www-data:www-data . &&

rm -rf var/cache &&
rm -rf var/di &&
rm -rf var/page_cache/ &&
rm -rf var/generation/ &&
rm -rf var/view_preprocessed/

the error is

"Use of undefined constant MCRYPT_RIJNDAEL_256 – assumed 'MCRYPT_RIJ NDAEL_256"

when i was checking my server, and show the phpinfo(), the extension for mcrypt has been enabled properly, so what is the real problem?
enter image description here

Best Answer

This worked for me:

sudo add-apt-repository ppa:ondrej/php
sudo apt-get install php7.1-mcrypt

Hope it help.

Related Topic