將「Yosemite」更新爲「El Capitan」後,mcrypt擴展出現問題。將OSX更新爲「El Capitan」後未定義函數mcrypt
Fatal error: Call to undefined function mcrypt_decrypt() in /Users/Pilipe/Sites/prestashop-test/classes/Rijndael.php on line 68
在我的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它不工作?
預先感謝您。
真誠的菲利普。
您是否解決了您的問題?因爲我有同樣的問題。 –
沒有對不起,我禁用了「SIP」,但我仍然有同樣的問題。 – Pilipe
看看我的答案在這裏http://stackoverflow.com/questions/32908829/error-in-mcrypt-after-upgrading-into-el-cap-capitan-os – Zakaria