9

I'm just downloaded the files from this link, extracted and tried 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'm running on localhost with xampp... I had the same issue with beta 1 and 2.

Tijme
  • 39
  • 2
  • 24
  • 41
Daniel Faria
  • 1,476
  • 5
  • 24
  • 45

2 Answers2

33

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

Solution Xampp (Windows)

  1. Open /xampp/php/php.ini
  2. Change ;extension=php_intl.dll to extension=php_intl.dll (remove the semicolon)
  3. Copy all the /xamp/php/ic*.dll files to /xampp/apache/bin
  4. Restart apache in the Xampp control panel

Solution Linux (thanks to Annamalai Somasundaram)

  1. Install the php5-intl extension sudo apt-get install php5-intl

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

  2. Restart apache sudo service apache2 restart

Solution Mac/OSX (homebrew) (thanks to deizel)

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

Eventually you can run composer install to check if it's working.

Community
  • 1
  • 1
Tijme
  • 39
  • 2
  • 24
  • 41
2

Change in php ini file

For Older php version

;extension=php_intl.dll to extension=php_intl.dll

For New php versions

  ;extension=intl to extension=intl
Kaleemullah
  • 446
  • 3
  • 8