How do I enable the intl extension in CakePHP?

Srinidhi Karnati picture Srinidhi Karnati · Aug 9, 2017 · Viewed 13.9k times · Source

I am using CakePHP 3 and MAMP Pro server for my project. When I am trying to bake the cake, this error shows up:

Fatal error: You must enable the intl extension to use CakePHP.

I have even included intl.so and extension=php_intl.dll in my php.ini file but couldn't figure out solution for this error.

Answer

Carlos Espinoza picture Carlos Espinoza · Aug 5, 2018

this issue was happening to me some days ago. I had installed Ubuntu 18.04 and php 7.1.

I was trying to run the comman php cake.php bake in orden to use cakephp's console but I was getting the following error message:

  • You must enable the intl extension to use CakePHP.

This extension (intl) was installed for php 7.1 (php7.1-intl) but this message was appearing every time I used php cake.php bake

After some google searches, I saw that I have to install the extension but with the following command:

sudo apt-get install php-intl

The same issue happened with mbstring extension, I used the command:

sudo apt-get install php-mbstring

then I restarted the apache server with:

sudo service apache2 restart