How to Solve “You must enable the intl extension to use CakePHP”




When you first install CakePHP3, I guess “enable the intl extension” is the first hurdle.
It’s been a while since I first dealt with this problem, but I remember it was complicated a little.

Today, I’m going to introduce some solutions worked for me.

The Terminal command might intimidate you, but don’t worry!
I’m going to share every step I took.



macOS High Sierra
XAMPP 7.0.26


Let’s get started!

Step1: Open Terminal and Check if Homebrew is installed

Users-MacBook:~ user$ which brew

If it returns:
/usr/local/bin/brew → Step3
not found → Step2


Step2: Install Homebrew

Access to, then copy and Paste a install command.

Users-MacBook:~ user$ Copy & Paste Here


Step3: Check PHP path

Users-MacBook:~ user$ which php

If it returns:
/usr/bin/php → Step4
/Applications/XAMPP/xamppfiles/bin/php → Step5


Step4: Change Path

Users-MacBook:~ user$ PATH=”/Applications/XAMPP/xamppfiles/bin:${PATH}”


Step5: Install icu4c

Users-MacBook:~ user$ brew install icu4c


Step6: Install intl

Users-MacBook:~ user$ sudo pecl update-channels
Users-MacBook:~ user$ sudo pecl install intl


If you get “Cannot find autoconf” message:

Users-MacBook:~ user$ brew install autoconf


Succeed → Step7
Failed → Skip Step7


Step7: Activate intl & Restart XAMPP

Open /Applications/XAMPP/xamppfiles/etc/php.ini , and find

;   // Remove semicolon

Then, restart XAMPP.


Another way to install Intl

The above steps may not work for you. In this step, I’ll introduce you a different way.

1. Open a new window in Terminal.

2. Search available intl version.

Users-MacBook:~ user$ brew search intl


You’ll get the result like this:

homebrew/php/php53-intl     homebrew/php/php55-intl     homebrew/php/php70-intl
homebrew/php/php54-intl     homebrew/php/php56-intl     homebrew/php/php71-intl


3. Install Intl according to your PHP version.

Users-MacBook:~ user$ brew install homebrew/php/php70-intl


4. Activate intl & Restart XAMPP

Open /Applications/XAMPP/xamppfiles/etc/php.ini , and find

extension=”/usr/local/Cellar/php70-intl/7.0.27_24/” ← Add (change the path according to your version.)

Then, restart XAMPP.



About Sara

Working as a freelance programmer in Japan. I'll try to make coding as simple as possible. Hope you enjoy coding 🙂