Using the mcrypt extension for PHP 7.2 and above

Using the mcrypt extension for PHP 7.2 and above

Using the mcrypt extension for PHP 7.2 and above

Introduction

The mcrypt extension has been deprecated by PHP developers, so it is not available via cPanel's EasyApache. Applications should instead use sodium or OpenSSL for encryption.

It may be possible to use the mcrypt extension in PHP 7.2 and above, but this is not supported by cPanel. Below are instructions you may attempt, but ultimately, cPanel cannot guarantee they will work.

 

Procedure

    1. Install the libmcrypt package:
      • AlmaLinux, CentOS, CloudLinux, and Rocky Linux:

        yum install libmcrypt
      • Ubuntu

        apt install libmcrypt
  1. Install the EPEL repository (not required on Ubuntu):
    yum install epel-release
  2. Install the libmcrypt-devel package:
    • AlmaLinux, CentOS, CloudLinux, and Rocky Linux
      yum install libmcrypt-devel
    • Ubuntu
      apt install libmcrypt-dev
  3. Install mcrypt via PECL:
    /opt/cpanel/ea-php##/root/usr/bin/pecl install mcrypt
    Please note that you will need to replace ea-php## with the needed PHP version.

If your server is making use of LiteSpeed, be sure to restart detached PHP processes with the following steps:

  1. Log in to WHM as the root user.
  2. Navigate to "Home / Plugins / LiteSpeed Web Server Plugin."
  3. Click the "Restart Detached PHP Processes" button.

Contact Digital Analytix

What's Your Reaction?

like
0
dislike
0
love
0
funny
0
angry
0
sad
0
wow
0