The mcrypt extension is deprecated as of PHP 7.2 and no longer comes natively compiled. It can, however, still be installed separately via the PECL installer. Here we cover the steps to install the mcrypt extension on your VPS or Dedicated server via command line.
Related Articles
Install mcrypt
CAUTION: This solution will require root access. If this needs to be obtained, follow the guide on requesting root access.
- SSH into the server as the root user, or access the Terminal in Root WHM
- Enable the EPEL repository by running the following command
yum install epel-release -y
- Install libmcrypt and libmcrypt-devel by running the following command
yum install -y libmcrypt libmcrypt-devel ea-libmcrypt ea-libmcrypt-devel
- Install the mcrypt PHP extension with the PECL installer by running the following command
/opt/cpanel/ea-php72/root/usr/bin/pecl install mcrypt
NOTE: Replace the PHP version in the command as needed. This will be the desired PHP version minus the "." For example, if you want to install the extension for PHP 7.4 or 8.0, "ea-php72" would need to be replaced with "ea-php74" or "ea-php80".
NOTE: You will just need to press the Enter key at the "libmcrypt prefix? [autodetect]" prompt - Restart the PHP-FPM service
/scripts/restartsrv_apache_php_fpm
Comments
0 comments
Article is closed for comments.