Install PHP intl extension on MacOS

╄→гoц情女王★ 提交于 2019-12-10 13:55:07

问题


I am facing some issues in the installation of Cakephp. I hope any one had faced the same issue.

The error

- cakephp/cakephp 3.3.9 requires ext-intl * -> the requested PHP extension intl is missing from your system.

As per the error message, I removed ; from php.ini file but still getting the same error.

I have Mac 10.12 Sierra, Xampp 5.6.28-1 version and PHP 5.6.24 version.


回答1:


  1. Install the php5-intl extension brew install php56-intl
  2. If you get No available formula for php56-intl do brew tap homebrew/homebrew-php
  3. Restart Apache sudo apachectl restart



回答2:


intl is installed by default on php7.1 with brew.

If you already have php7.1, you might want to uninstall it first:

brew uninstall php71

Then install it with pear:

brew install php71 --with-pear

Then force the links:

brew link php@7.1 --force



回答3:


Try AMMPS. It has a lot great features and you can easily change PHP extensions:




回答4:


1 Make sure remove # from your php.ini file:

$extension=ext/php_intl.dll

2 If you have already enabled intl,add the path to environment and restart

3 Install by brew .

$brew install icu4c 
$sudo pecl install 
$intl php -m | grep intl 


来源:https://stackoverflow.com/questions/42085083/install-php-intl-extension-on-macos

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!