What is mcrypt php extension?
← ServerPilot Docs Show In the examples shown, replace "X.Y" with your app's PHP version (for example, "7.2"). 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. It was removed from PHP 7.2 and moved to an unofficial PECL extension because the mcrypt library is no longer maintained. For PHP 7.2+, PHP instead uses libsodium as a cryptography library. ServerPilot builds PHP 7.2+ with the official libsodium extension. New PHP code should be written to use libsodium rather than mcrypt. Installing mcrypt on PHP 5, PHP 7.0, and PHP 7.1You do not need to install the mcrypt extension on PHP 5, 7.0, or 7.1. ServerPilot builds these PHP versions with the mcrypt extension so it is always available. Installing mcrypt on PHP 7.2, 7.3, or 7.4To install this extension on PHP 7.2 through 7.4, run the following commands as your server's root user: sudo apt-get -y install gcc make autoconf libc-dev pkg-config sudo apt-get -y install libmcrypt-dev sudo pecl7.2-sp install --nodeps mcrypt-snapshot When you are shown the prompt libmcrypt prefix? [autodetect] : Press Enter to autodetect. Once installed, create a configuration file for the extension and restart PHP by running the following commands as root: sudo bash -c "echo extension=mcrypt.so > /etc/php7.2-sp/conf.d/mcrypt.ini" sudo service php7.2-fpm-sp restart Verifying mcrypt Is InstalledYou can check that the extension was installed with this command: php7.2-sp -i | grep mcrypt The output will look like this: $ php7.2-sp -i | grep mcrypt /etc/php7.2-sp/conf.d/mcrypt.ini, Registered Stream Filters => zlib.*, convert.iconv.*, bzip2.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, mcrypt.*, mdecrypt.* mcrypt mcrypt support => enabled mcrypt_filter support => enabled mcrypt.algorithms_dir => no value => no value mcrypt.modes_dir => no value => no value Uninstalling the Mcrypt ExtensionTo uninstall this extension, as root run the commands: sudo rm /etc/phpX.Y-sp/conf.d/mcrypt.ini sudo peclX.Y-sp uninstall mcrypt Next, restart PHP-FPM with the command: sudo service phpX.Y-fpm-sp restart Last updated: October 8, 2018
Kyle T ¶ 4 years ago
Maarten Malaise ¶ 12 years ago
Anonymous ¶ 10 years ago
decrypt($encrypted, $password, $salt='!kQm*fF3pXe1Kbm%9') {
ghoffman at salientdigital dot com ¶ 11 years ago
= mcrypt_list_modes(); Daniel Esteve ¶ 5 years ago
What is mcrypt PHP extension required?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 I enable PHP mcrypt extension?You can install Mcrypt from the PHP Source Tree as a module if you choose. Enable the module by adding: 'extension=mcrypt.so' to PHP. ini. Done!
How do I install mcrypt extension?We've put together instruction on how to enable php-mcrypt for both Unix and Windows servers.. Find php. ini (main php configuration file). Open and search for;extension=php_mcrypt. dll ). Uncomment/remove “;” and save the php. ini.. How do I know if mcrypt is installed?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".
|