Locale class not found on CakePHP 3

I just downloaded the files from this link , extracted and tried to execute, but I had this error:

Fatal error: Class 'Locale' not found in D:\xampp\htdocs\cake-3-beta-2\vendor\cakephp\cakephp\src\I18n\I18n.php on line 229 

I work on localhost with xampp ... I had the same problem with beta versions 1 and 2.

+5
source share
1 answer

Today I faced the same problem. You need to enable the PHP intl extension in your PHP configuration ( .ini ).

Xampp Solution (Windows)

  • Open /xampp/php/php.ini
  • Change ;extension=php_intl.dll to extension=php_intl.dll (remove the semicolon)
  • Copy all the /xamp/php/ic*.dll files to /xampp/apache/bin
  • Restart apache in Xampp Control Panel

Linux solution (thanks to Annamalai Somasundaram)

  • Install extension php5-intl sudo apt-get install php5-intl

    1.1. Alternatively, use sudo yum install php5-intl if you are on CentOS or Fedora.

  • Restart apache sudo service apache2 restart

Mac / OSX solution (homebrew) (thanks deizel)

  • Install extension php5-intl brew install php56-intl
  • If you get No available formula for php56-intl , follow these instructions.
  • Restart apache sudo apachectl restart

In the end, you can run composer install to see if it works.

+17
source

Source: https://habr.com/ru/post/1203837/


All Articles