Sunday, October 28, 2018

PHP 7.2 and CakePHP 3.6, You must enable the intl extension to use CakePHP.

I got this error when I  was deploying CakePHP 3.6 project to AWS EB Environment with PHP 7.2.
Fatal error: You must enable the intl extension to use CakePHP.
the error occurred when deploy process run migrations script.

In /etc, there are PHP-7.1.d and PHP-7.2.d.
I checked configuration with
php -i | grep 7.2
Then console displayed no configuration file and directory.
I changed 7.2 to 7.1 and show the /etc/php-7.1.conf and list of .ini files under /etc/php-7.1.d/.
There is no 20-intl.ini file inside /etc/php-7.1.d/.

Simply changing config to PHP 7.2 solved my problem.

But I don't understand why there are configurations of 2 versions.
I created totally new environment and never installed PHP 7.1.