$ composer update
The mcrypt is a replacement of Unix/Linux crypt( ) that encrypt files. The PHP extension is php-mcrypt, and this is used to interface between PHP application and the mcrypt utility.
However, there is a solution that use mcrypt found in the PHP Extension Community Library (PECL). In this example, its tested on
CentOS 7.5
Apache 2.4.6 (CentOS)
PHP 7.2.5 (sp.repo.webtatic.com)
Step 1. Install mcrypt utility.
$ pecl search mcryptWARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
Retrieving data...0%
.Matched packages, channel pecl.php.net:
=======================================
Package Stable/(Latest) Local
mcrypt 1.0.1 (snapshot) Bindings for the libmcrypt library
mcrypt_filter 0.1.0 (beta) Applies mcrypt symmetric encryption using stream filters
Install mcrypt and its development library then update the pecl.
$ sudo pecl channel-update pecl.php.net
$ sudo yum install libmcrypt
$ sudo yum install libmcrypt-devel
Step 2. Install php-devel (or php72w-devel if you use webtatic repo)
$ sudo yum install php72w-develStep 3. Install mcrypt extension
Either specify specifically a channel or use default$ sudo /usr/bin/pecl install channel://pecl.php.net/mcrypt-1.0.1
or
$ sudo /usr/bin/pecl install mcrypt-1.0.1
Create the file /etc/php.d/mcrypt.ini with the contents
; Enable mcrypt extension module from pecl
extension=mcrypt.so
Restart Web server.
Note: If for some strange reason php still doesn't detect mcrypt extension, I would give a reboot.
Done.
No comments:
Post a Comment