我在将"Yosemite"升级为"El Capitan"后遇到了mcrypt扩展的问题。
在我的php.ini中,我添加了以下行:
extension="/usr/local/Cellar/php56-mcrypt/5.6.13/mcrypt.so"
当我运行以下命令时: php -i | grep 'mcrypt'
我得到:
Additional .ini files parsed => /usr/local/etc/php/5.6/conf.d/ext-mcrypt.ini Registered Stream Filters => zlib., bzip2., convert.iconv., string.rot13, string.toupper, string.tolower, string.strip_tags, convert., consumed, dechunk, mcrypt., mdecrypt. PHP Warning: Unknown: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0 mcrypt mcrypt support => enabled mcrypt_filter support => enabled mcrypt.algorithms_dir => no value => no value mcrypt.modes_dir => no value => no value PWD => /usr/local/Cellar/php56-mcrypt/5.6.13 _SERVER["PWD"] => /usr/local/Cellar/php56-mcrypt/5.6.13
命令 php -v :
PHP 5.6.13 (cli) (built: Oct 2 2015 23:07:16) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
我使用以下命令安装了mcrypt:
brew install php56-mcrypt
我使用以下命令进行了链接:
brew link php56-mcrypt
为什么mcrypt无法工作?
谢谢。 Philippe.
在我的php.ini中,我添加了以下行:
extension="/usr/local/Cellar/php56-mcrypt/5.6.13/mcrypt.so"
当我运行以下命令时: php -i | grep 'mcrypt'
我得到:
Additional .ini files parsed => /usr/local/etc/php/5.6/conf.d/ext-mcrypt.ini Registered Stream Filters => zlib., bzip2., convert.iconv., string.rot13, string.toupper, string.tolower, string.strip_tags, convert., consumed, dechunk, mcrypt., mdecrypt. PHP Warning: Unknown: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0 mcrypt mcrypt support => enabled mcrypt_filter support => enabled mcrypt.algorithms_dir => no value => no value mcrypt.modes_dir => no value => no value PWD => /usr/local/Cellar/php56-mcrypt/5.6.13 _SERVER["PWD"] => /usr/local/Cellar/php56-mcrypt/5.6.13
命令 php -v :
PHP 5.6.13 (cli) (built: Oct 2 2015 23:07:16) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
我使用以下命令安装了mcrypt:
brew install php56-mcrypt
我使用以下命令进行了链接:
brew link php56-mcrypt
为什么mcrypt无法工作?
谢谢。 Philippe.