intl扩展 mac 安装php,在Mac中安装PHP INTL的操作不正确

I have installed php56-intl using Homebrew like so: brew install php56-intl

and when I do php -m | grep intl it gives me intl

But when I check in my phpinfo() file, doesn't show up intl.

Not sure what am I missing.

Update

All I want to install intl in my computer so that I could run my zend application. But whatever I do I don't get it done.

An error occurred An error occurred during execution; please try again

later.

Additional information:

Zend\I18n\Exception\ExtensionNotLoadedException File:

/Applications/XAMPP/xamppfiles/htdocs/skeleton/vendor/zendframework/zend-i18n/src/Filter/AbstractLocale.php:24

Message:

Zend\I18n\Filter component requires the intl PHP extension

解决方案

The problem was, intl was installed in my mac but not in XAMPP.

Alright, after long hassle here how I succeeded:

Go to your terminal and

cd /Applications/XAMPP/bin

Then php -m | grep intl, if it returns you intl then it is installed. If not installed then should return empty.

Now, sudo ./pecl install intl

Will ask specify where ICU libraries and headers can be found, simply hit enter,

And this will install intl, also will return this message You should add "extension=intl.so" to php.ini.

So simply add this to your php.ini file and restart your apache: sudo apachectl restart or hard restart from XAMPP itself.

Hope this helps someone else.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值