I tried to follow: PHP Warning: PHP Startup: Unable to load dynamic library 'mcrypt.so'
sudo apt-get -y install gcc make autoconf libc-dev pkg-config
sudo apt-get -y install php7.2-dev
sudo apt-get -y install libmcrypt-dev
sudo pecl install mcrypt-1.0.1
I get:
pecl/mcrypt requires PHP (version >= 7.2.0, version <= 7.3.0, excluded versions: 7.3.0), installed version is 7.3.3-1+ubuntu14.04.1+deb.sury.org+1
No valid packages found
install failed
I use prestashop which require this
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!
Installation of php-mcryptini file using nano editor. Now edit the php. ini file and under Dynamic extension, type: extension=mcrypt.so beside other extensions, as shown in the screenshot. Save the file ctrl+X, type Y, and hit the Enter key.
Determine if the mcrypt extension is loaded in any of the following ways: Set up a phpinfo. php file in the web server's root directory and examine the output in a web browser. Run the following command: $ php -r "phpinfo();" | grep mcrypt.
What is mcrypt? The mcrypt extension is a replacement for the UNIX crypt command. These commands serve as a means to encrypt files on UNIX and Linux systems. The php-mcrypt extension serves as an interface between PHP and mcrypt.
If anyone is using an AWS bitnami install w/ php7.3.10, the following is a layout with appropriate file paths (references listed below)
$ php -version
mcrypt
extension$ sudo apt-get -y install gcc make autoconf libc-dev pkg-config
$ sudo apt-get -y install libmcrypt-dev
$ sudo pecl install mcrypt-1.0.2
Or the newest version: https://pecl.php.net/package/mcrypt
$ sudo pecl install mcrypt-1.0.1
> libmcrypt prefix? [autodetect] :
mcrypt
in php.ini -> check if mcrypt
is already in php.ini and maybe just needs to be uncommented$ more /opt/bitnami/php/etc/php.ini | grep mcrypt
;extension=mcrypt.so
extension=mcrypt.so
in php.ini$ emacs /opt/bitnami/php/etc/php.ini
https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
How to install mcrypt on PHP 7.3.3 ubuntu
https://stackoverflow.com/a/55678046/2298002
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With