PHP Module: Mcrypt
Last modified: September 16, 2024
Overview
The mcrypt
PHP module provides an interface to the mcrypt
library to support encryption. The cPanel-provided EasyApache 4 profiles include the mcrypt
PHP module by default.
Compatibility
As of PHP 7.2, this module is only available through the PHP Extension Community Library (PECL).
Requirements
This module depends on the mcrypt
library, which EasyApache 4 installs to the /opt/cpanel/libmcrypt
directory when you install the mcrypt
module.
Installation steps
In the interface
To install or uninstall the mcrypt
PHP module, use WHM’s EasyApache 4 interface (WHM » Home » Software » EasyApache 4).
On the command line
To install the mcrypt
PHP module, perform the following steps:
-
On the command line as the
root
user, copy the files from the/opt/cpanel/libmcrypt/lib64/
directory to the/opt/cpanel/libmcrypt/lib/
directory with the following command:rsync -avH /opt/cpanel/libmcrypt/lib64/ /opt/cpanel/libmcrypt/lib/
-
Install the
mcrypt
module with the following command:ea-php81-pecl install mcrypt-1.0.2
-
When the system prompts for the
libmcrypt
prefix, enter the following directory path:/opt/cpanel/libmcrypt