[英]Installing PHP INTL in mac not getting it right
我已经安装了php56-intl
使用家酿象这样: brew install php56-intl
,当我做php -m | grep intl
php -m | grep intl
它给了我intl
但是当我检查我的phpinfo()
文件时,没有显示intl
。
不知道我错过了什么。
更新
所有我想在我的计算机上安装intl
,以便我可以运行我的zend
应用程序。 但无论我做什么,我都做不到。
发生错误执行期间发生错误; 请稍后再试。
附加信息:
Zend \\ I18n \\ Exception \\ ExtensionNotLoadedException文件:
/Applications/XAMPP/xamppfiles/htdocs/skeleton/vendor/zendframework/zend-i18n/src/Filter/AbstractLocale.php:24
信息:
Zend \\ I18n \\ Filter组件需要intl PHP扩展
问题是,intl安装在我的mac中但不安装在XAMPP中。
好吧,经过长时间的麻烦,我成功了:
去你的终端吧
cd /Applications/XAMPP/bin
然后php -m | grep intl
php -m | grep intl
,如果它返回intl
则安装它。 如果没有安装,则应返回empty
。
现在, sudo ./pecl install intl
将询问specify where ICU libraries and headers can be found
,只需按Enter键,
这将安装intl,也将返回此消息You should add "extension=intl.so" to php.ini
。
所以只需将其添加到您的php.ini
文件并重新启动您的apache: sudo apachectl restart
或从XAMPP本身重启。
希望这有助于其他人。
我遇到类似OsX默认php的问题,没有intl扩展名。 这就解决了我的问题:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.