how to install php mcrypt module

Solutions on MaxInterview for how to install php mcrypt module by the best coders in the world

showing results for - "how to install php mcrypt module"
Louisa
27 Feb 2020
1'if you don\'t have php installed, run:
2sudo apt install php-7.2
3
4'if php is already installed, start from here:
5'this is the required dependency
6sudo apt install php-dev libmcrypt-dev php-pear
7
8'installing using pecl channel
9sudo pecl channel-update pecl.php.net
10sudo pecl install mcrypt-1.0.1
11
12'After successfull installation you will get the following:
13  'Build process completed successfully
14  'Installing \'/usr/lib/php/20170718/mcrypt.so'
15  'install ok: channel://pecl.php.net/mcrypt-1.0.1
16  'configuration option "php_ini" is not set to php.ini location
17  'You should add "extension=mcrypt.so" to php.ini
18  
19'you can choose any editor of your choice
20sudo vi /etc/php/7.2/cli/php.ini
21
22'Now copy:
23  [PHP]
24  extension=mcrypt.so
25'then save the file and exit
26
27'If you are using apache2 server, make the above mentioned change in the following file:
28sudo vi /etc/php/7.2/apache2/php.ini
29
30'then save, and you\'re done!