简体   繁体   中英

Install PHP intl extension on MacOS

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. 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

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

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

在此输入图像描述

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 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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