Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CakePHP 3.0 installation: intl extension missing from system

Using the CakePHP docs, I am trying to install 3.0-beta2 using composer but I got this error:

cakephp/cakephp 3.0.x-dev requires ext-intl * -> the requested PHP extension intl is missing from your system

However, I know for sure that intl is installed (it shows on phpinfo). I'm using PHP 5.4.33/Apache 2.4.10.1

like image 889
Juan Carlos Avatar asked Oct 09 '14 18:10

Juan Carlos


6 Answers

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 /xampp/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. It will give an error if it's not.

like image 182
Tijme Avatar answered Nov 01 '22 02:11

Tijme


I faced the same issue in ubuntu 12.04

Installed: sudo apt-get install php5-intl

Restarted the Apache: sudo service apache2 restart

like image 43
AnNaMaLaI Avatar answered Nov 01 '22 02:11

AnNaMaLaI


OS X Homebrew (May 2015):

The intl extension has been removed from the main php5x formulas, so you no longer compile with the --enable-intl flag.

If you can't find the new package:

$ brew install php56-intl
Error: No available formula for php56-intl

Follow these instructions: https://github.com/Homebrew/homebrew-php/issues/1701

$ brew install php56-intl
==> Installing php56-intl from homebrew/homebrew-php
like image 34
deizel Avatar answered Nov 01 '22 02:11

deizel


When using MAMP

1 Go to terminal

vim ~/.bash_profile

i

export PATH=/Applications/MAMP/bin/php/php5.6.2/bin:$PATH

Change php5.6.2 to the php version you use with MAMP

Hit ESC, Type :wq, hit Enter

source ~/.bash_profile

which php

2 Install Mac Ports

https://www.macports.org/install.php

sudo port install php5-intl OR sudo port install php53-intl

cp /opt/local/lib/php/extensions/no-debug-non-zts-20090626/intl.so /Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/

{take a good look at the folder names that u use the right ones}

3 Add extension

Now, add the extension to your php.ini file:

extension=intl.so

Usefull Link: https://gist.github.com/irazasyed/5987693

like image 20
Gilko Avatar answered Nov 01 '22 03:11

Gilko


The error message clearly states what the problem is. You need the intl extension installed.

Step 1: install PHP intl you comfortable version

$sudo apt-get install php-intl

step 2:

For XAMPP Server intl extension is already installed, you need to enable this extension to uncomment below the line in your php.ini file. Php.ini file is located at c:\xampp\php\php.ini or where you have installed XAMPP.

Before uncomment:

;extension=php_intl.dll ;extension=php_mbstring.dll

After uncommenting:

extension=php_intl.dll extension=php_mbstring.dll

like image 3
venkatskpi Avatar answered Nov 01 '22 03:11

venkatskpi


Short answer: activate intl extension in php_cli.ini. Thanks to @ndm for his input.

like image 2
Juan Carlos Avatar answered Nov 01 '22 03:11

Juan Carlos