0%

PHP安装mcrypt扩展

虽然已经很熟悉了,但还是记录一下。

1
2
3
jun@192 ~ % php -i|grep php.ini
Configuration File (php.ini) Path => /Applications/MAMP/bin/php/php7.3.24/conf
Loaded Configuration File => /Applications/MAMP/bin/php/php7.3.24/conf/php.ini

wget http://pecl.php.net/get/mcrypt-1.0.4.tgz
解压并进入目录
/Applications/MAMP/bin/php/php7.3.24/bin/phpize
./configure –with-php-config=/Applications/MAMP/bin/php/php7.3.24/bin/php-config
make
make install
打开ini文件加入 extension=mcrypt.so

1
2
3
4
5
6
7
jun@192 ~ % php -i|grep mcrypt
Registered Stream Filters => zlib.*, bzip2.*, convert.iconv.*, 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