DirectAdmin Knowledge Base and Support

DirectAdmin is a web panel for a simple administration of both virtual and dedicated servers. DirectAdmin is faster, safe and more powerful than any other CP. And we know how to customize and support it.

Install mcrypt for PHP 7.2 on Directadmin server

| 01:30:29 28.03.2018

The mcrypt extension has been abandonware for some time already, and was also fairly complex to use. It has therefore been deprecated by PHP developers in favor of OpenSSL in PHP 7.1, and it was removed from the core and moved into PECL in PHP 7.2. 

Here is another guide on how to install PECL extension under Linux. 

So again?

You can find our previous guide for installing PECL extensions here: https://help.poralix.com/articles/installing-a-pecl-extension-for-php-on-directadmin-server 

This time it is mcrypt. Let's go.

How to install mcrypt extension for PHP 7.2

To be short here you can find a list of commands to run as root in a bash-console:

cd /usr/local/src
rm -rf mcrypt-*
/usr/local/php72/bin/pecl channel-update pecl.php.net
/usr/local/php72/bin/pecl download mcrypt || /usr/local/php72/bin/pecl download channel://pecl.php.net/mcrypt-1.0.1
tar -zxvf mcrypt-*.tgz && cd mcrypt-*/
/usr/local/php72/bin/phpize
./configure --with-php-config=/usr/local/php72/bin/php-config
make && make install
echo "extension=mcrypt.so" >> /usr/local/php72/lib/php.conf.d/90-custom.ini

Restart PHP-FPM, Apache for changes to take effect.

Now test it:

/usr/local/php72/bin/php -i | grep ^mcrypt

You should see similar output:

mcrypt
mcrypt support => enabled
mcrypt_filter support => enabled
mcrypt.algorithms_dir => no value => no value
mcrypt.modes_dir => no value => no value

That's it.

About Us
We are a team of professionals, and specialize in installation, configuring and managing of remote virtual and dedicated servers powered by Linux/Unix-like OS with DirectAdmin. We support various sets of software, including web-servers Apache, Nginx; internet domain name servers Bind, PowerDNS; mail-servers with POP3, IMAP and SMTP, FTP-servers, etc. After years of working through the most complex server challenges our team has gathered valuable expirience and universal solutions suitable for everyday tasks. We are here to lend you a helping hand and take care of your servers in order to let you have enough time to do more of what you love.




All of the information and data on this site is for informational purposes only and is provided for the convenience of the user.
Powered by: Amiro.CMS - Free edition