Let’s have a deeper look at how to Activate Mcrypt PHP Ubuntu. At Bobcares, we respond to all your queries and provide solutions with the support of our Server management support services.
How to Activate Mcrypt PHP Ubuntu
PHP Mcrypt extension provides encryption to web applications that require the functionality of modern algorithms such as AES. Usually, this extension works as an interface to the Mcrypt’s libmcrypt library, which implements all the algorithms and modes found in it such as DES, TripleDES, Blowfish (default), SAFER-SK128, LOKI97, RC2, RC6, IDEA, and more.
PHP developers have removed the features from the PHP package bundle since the launch of php7.2 because there was no further development in Mcrypt, thus the extension also gets decrypted. However, OpenSSL is now an alternative to it.
The PHP Mcrypt extension has been moved to the PECL repository, so if anyone wants, they can install it on Ubuntu 20.04 LTS using Pear.
Open terminal to run system update
If you are using the CLI server then you can go to the terminal and simply run the system update command to refresh the repo cache and update the installed packages of the system.
Install Developer tools & Dependencies
To install PHP Mcrypt on Ubuntu 20.04 or Debian, we have to download some tools that needed to build packages from the source along with developer dependency packages.
sudo apt install gcc make autoconf libc-dev pkg-config libmcrypt-dev php-pear php-dev
Channel update for PEAR and PECL
Follow below two commands to update the channels that allow Pear and Pecl to fetch packages:
pecl channel-update pecl.php.net
pecl update-channels
Install Php Mcrypt extension
Next, to download and install php-mcrypt extension on your system, execute the Pecl command:
pecl install mcrypt
Enable “extension=mcrypt.so” via php.ini
Once the installation is complete to activate the extension we have to add it to the php.ini file of the system.
sudo nano /etc/php/*/apache2/php.ini
Now edit the php.ini file and under Dynamic extension, type: extension=mcrypt.so
and save the file.
Restart Apache
Reload the Apache server to ensure that your web server has successfully enabled the PHP Mcrypt extension:
sudo systemctyl reload apache2
Check Mcrypt enabled
Run the below command to confirm if Mcrypt configured properly:
php -m | grep mcrypt
The output will be:
mcrypt
[Looking for a solution to another query? We are just a click away.]
Conclusion
To sum up, we can Activate the Mcrypt PHP Ubuntu with simpler provided steps. PHP Mcrypt extension has excellent encryption facilities for web applications such as AES.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
0 Comments