Thursday, July 2, 2020

How To Install PHP Mcrypt Extension on Ubuntu 18.04 | 20.04

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

PHP Mcrypt extension is an interface to the mcrypt cryptography library and it supports a wide variety of block algorithms such as DES, TripleDES, Blowfish (default), 3-WAY, SAFER-SK64, SAFER-SK128, TWOFISH, TEA, RC2 and GOST in CBC, OFB, CFB and ECB cipher modes.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

apt update ; apt install -y build-essential net-tools curl git software-properties-common php php-pear php-dev libmcrypt-dev

which pecl ; php -v


PECL usage: pecl help

pecl channel-update pecl.php.net


mkdir -p /tmp/pear/cache

pecl search mcrypt

pecl install mcrypt


Ubuntu 20.04 LTS

nano /etc/php/*/cli/php.ini     || nano /etc/php/*/apache2/php.ini

extension=mcrypt.so

php -m | grep mcrypt


Ubuntu 18.04: -

nano /etc/php/7.2/cli/php.ini   || nano /etc/php/7.2/apache2/php.ini

extension=mcrypt.so

php -m | grep mcrypt


systemctl daemon-reload

systemctl restart apache2  Or systemctl restart nginx

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

1 comment: