How to enable php-mcrypt extension in cpanel
Last modified: July 8, 2022 Show
OverviewThe CompatibilityAs of PHP 7.2, this module is only available through the PHP Extension Community Library (PECL). RequirementsThis module depends on the Installation stepsIn the interfaceTo install or uninstall the On the command lineTo install the
Additional Documentation
cPanel, WebHost Manager and WHM are registered trademarks of cPanel, L.L.C. for providing its computer software that facilitates the management and configuration of internet web servers.
Do the below steps to install mcrypt PHP extension on CentOS and RHEL servers. 1. Log into your Linux server via SSH as ‘root’ user 2. Install EPEL repository by running “yum install epel-release” Edit epel.repo and change enabled=1 3. Check yum.conf and remove php* from yum exclude list (if you have added php in yum exclude list) 4. Run the command “yum -y install php-mcrypt” to install PHP mycrypt extension 5. Restart apache service using command : service httpd restart Now Type the command “php -m | grep mcrypt” to check whether it is installed correctly. You can also check by creating a phpinfo page under the website. [root@server ~]# php -m | grep mcrypt How to Install mcrypt extension on cPanel Servers with Easyapache 4On easyapache 4 servers you can use yum to install PHP extensions. You must have server root login details to install this PHP extension. 1. Log into cPanel server via SSH as root 2. Type the command “[root@server ~]# rpm -qa | grep mcrypt” to check whether Mcrypt is installed [root@server ~]# rpm -qa | grep mcrypt The extension is not installed on the above server 3. Run the command “yum install ea-phpXX-php-mcrypt” to install Mcrypt XX in the above command should be replaced with the correct PHP version. Command to install Mcrypt for PHP 5.4 : yum install ea-php54-php-mcrypt 4. Type the below command to verify it is installed correctly [root@server ~]# php -m | grep mcrypt [root@server ~]# rpm -qa | grep mcrypt How to Install mcrypt extension on cPanel Servers with Easyapache 3On easyapache 3 servers you can install mcrypt extension either through server backend or through WHM (I) Install Mcrypt through WHM : 1. Login to WHM using server root password Link to access WHM : https://YourServerIP:2087 2. Search for “EasyApache 3” in WHM search bar on left 3. Click on “EasyApache 3” under “Software” WHM Home » Software » EasyApache 3 4. Under “Exhaustive Options List” you must tick “Mcrypt”
5. Click on “Save and Build” (II)Enable mcrypt from server backend 1. Login to server via SSH as ‘root’ 2. Run easyapache in screen Command : screen -S easyapache Easyapache might get stopped if your session gets disconnected. All the sites will be down if easyapache gets interrupted. 3. Run the command “/scripts/easyapache” to start easyapache 4. Under “Exhaustive Options List” you must select “Mcrypt”
5. Select “Save and build” Create a phpinfo page under your domain to check whether “Mcrypt” extension is enabled. How do I enable mcrypt PHP extension in cPanel?Procedure. Install the libmcrypt extension: yum install libmcrypt.. Install the EPEL repository: yum install epel-release.. Install the libmcrypt-devel package from the EPEL repository: yum install libmcrypt-devel.. Install mcrypt via PECL: /opt/cpanel/ea-php72/root/usr/bin/pecl install mcrypt.. How do I know if mcrypt is enabled?You can also achieve this same screen by viewing a php file that has: phpinfo(); somewhere in the code. In this screen, simply search for the string "mcrypt support". If installed, you will see a box that says "enabled".
What is mcrypt PHP extension?The mcrypt extension is an interface to the mcrypt cryptography library. This extension is useful for allowing PHP code using mcrypt to run on PHP 7.2+. The mcrypt extension is included in PHP 5.4 through PHP 7.1.
How do you solve the Encrypt library requires the mcrypt extension?with php 7 and above mcrypt need not to be loaded manually so both of the solution will work.. $this->load->library('encrypt'); change to $this->load->library('encrypt');. Just remove encrypt from autoload. $autoload['libraries'] = array('database','session','upload','form_validation','encrypt','pagination');. |