Install PHP 7.2 mcrypt extension on CWP Server

The mcrypt extension has been abandonware for nearly a decade and was deprecated in PHP 7.1, It has been removed from PHP 7.2. On PHP 7.2 or newer, you can manually install mcrypt from PCEL if you use legacy PHP code that still uses outdated mcrypt extension.

To install PHP mcrypt module on PHP 7.2 in CWP server, do the following.

This will install the extension in folder /opt/alt/php72/usr/lib/php/extensions/no-debug-non-zts-20170718/. Copy it to php-fpm extension folder.

Create file mcrypt.ini for both php-fpm and php cli.

Now you need to restart php-fpm with command

Or though CWP admin area

centos panel restart php-fpm service

Back to CentOS Web Panel (CWP)

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published.