As of PHP 7.one, the php-mcrypt was deprecated. And as of PHP 7.2 it was fully taken out. This is a dilemma, given that a number of server software program titles even now rely upon this encryption device. And due to the fact software program like Nextcloud, ownCloud, and a lot of extra have yet to shift that dependency, you may well uncover yourself not able to set up with out mcrypt on the technique. What do you do? No matter how a lot of moments you operate possibly apt-get set up php-mcrypt or yum set up php-mcrypt, it won’t function.
Luckily, you will find a remedy. Reported remedy falls on to the shoulders of the pecl command. PECL is the PHP Extension Neighborhood Library, which serves as a repository for PHP extensions. By way of this repository, you can set up mcrypt.
What is mcrypt?
The mcrypt extension is a replacement for the UNIX crypt command. These instructions serve as a implies to encrypt files on UNIX and Linux units. The php-mcrypt extension serves as an interface amongst PHP and mcrypt.
SEE: Securing Linux policy (Tech Pro Analysis)
Receiving mcrypt put in
I’m likely to stroll you via the system of getting mcrypt put in on Ubuntu Server sixteen.04. It truly is not challenging after you have the vital dependencies extra to your technique. With mcrypt put in, you can keep on with the installation of the software program that is dependent upon this extension.
With that reported, how do we set up mcrypt? Very first, open up a terminal window and set up the vital dependencies with the instructions:
sudo apt-get -y set up gcc make autoconf libc-dev pkg-config sudo apt-get -y set up php7.2-dev sudo apt-get -y set up libmcrypt-dev
As soon as the dependencies have been put in, you can set up mcrypt with the command:
sudo pecl set up mcrypt-one..one
And there you go. Mcrypt is now put in. Go back to the system of putting in regardless of what server software program that is dependent upon this extension and you should really be excellent to go.
Not gone, just moved
Do not fear: mcrypt is not gone. It truly is just been moved out of PHP and into PECL. But for people who have been putting in by means of php-mcrypt for decades, this helps make for a very major shift. Now, instead of getting capable to set up mcrypt with a one command, you have 4 to deal with. Even so, at minimum you even now have mcrypt offered. At some point, having said that, I think the mcrypt dependency will be migrated to a further device (these as OpenSSL).