简体   繁体   English

国际PHP扩展不起作用

[英]Intl PHP extension not working

I want to use https://github.com/juriansluiman/SlmLocale module in zend framework-2 and need intl extension, I have installed using pecl and it show success. 我想在zend framework-2中使用https://github.com/juriansluiman/SlmLocale模块,并且需要intl扩展,我已经使用pecl安装了它,并且显示了成功。 I had added 我添加了

extension=intl.so

and restarted my MAMP-Pro, I had tried other links as well: http://mynameispagewood.com/web-development/how-to-enable-intl-extension-mamp-osx-10-9-2/ http://codingexplained.com/operating-systems/mac/installing-php-intl-extension-os-x-mavericks to enable it but its not working. 并重新启动了MAMP-Pro,我也尝试了其他链接: http: //mynameispagewood.com/web-development/how-to-enable-intl-extension-mamp-osx-10-9-2/ http:// /codingexplained.com/operating-systems/mac/installing-php-intl-extension-os-x-mavericks启用它,但它不起作用。

note: No error while starting apache 注意:启动apache时没有错误

Is their any alternate method to enable it? 他们是否有其他替代方法来启用它?

Any light on the path would be helpful 路径上的任何光线都会有所帮助

Thanks 谢谢

您将需要确保被调用的php版本在Brew的安装路径中,否则它将获取本机安装的php。

The problem can be solved by first checking the php version in the terminal. 通过首先在终端中检查php版本可以解决此问题。 The which php command will print the /Applications/MAMP/bin/php/php7.1.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin . which php命令将打印/Applications/MAMP/bin/php/php7.1.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

and then check echo $PATH /Applications/MAMP/bin/php/php7.1.8/bin/php If this is right, then no need of installing intl extension, restart MAMP PRO, then it should work. 然后检查echo $ PATH /Applications/MAMP/bin/php/php7.1.8/bin/php如果正确,则无需安装intl扩展名,重新启动MAMP PRO,它应该可以工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM