$ which mcrypt
/opt/local/bin/mcrypt
$ mcrypt -v
Mcrypt v.0.9.9 (i386-apple-darwin10.4.0)
Linked against libmcrypt v.2.5.8
Copyright (C) 1998-2002 Nikos Mavroyanopoulos ([email protected])
所以我有 mcrypt。如何让 PHP 使用它?除了添加
extension=mcrypt.so
到 php.ini,我也在 php.ini 中看到了这一点
[mcrypt]
; For more information about mcrypt settings see http://php.net/mcrypt-module-open
; Directory where to load mcrypt algorithms
; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt)
;mcrypt.algorithms_dir=
; Directory where to load mcrypt modes
; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt)
;mcrypt.modes_dir=
显然是没用过的。
如何让 mcrypt 在 PHP 中运行?
此安装是在 Mac OS X 10.6 上使用 MacPorts 进行的。如果可能的话,我宁愿不必重新编译 php。