Composer: The requested PHP extension ext-intl * is missing from your system

I am trying to use composer.json file. but, when I am trying to run command 'composer install' in my path/project/, I am getting an error:

enter image description here

I have already configured my wamp for 'extension=php_intl.dll' and copied all icu*.dll in 'D:\wamp\bin\apache\apache2.2.22\bin' from 'D:\wamp\bin\php\php5.3.13' and it's showing in phpinfo():

enter image description here

without copy icu*.dll also works and showing in phpinfo();

Kindly, let me know if I have intl install on my wamp and composer install on my pc then why I am getting this error. really, it is so annoying.

Here is my details:

  1. OS: windows 7 (64)
  2. PHP: 5.3.13
  3. Apache:2.2.22
  4. Composer: installed by executable file
  5. Pear: installed (latest)
  6. PHPUnit: installed (latest)

My composer.json is as below:

{
    "name" : "sebastian/money",
    "description" : "Value Object that represents a monetary value (using a currency's smallest unit)",
    "keywords" : ["money"],
    "homepage" : "http://www.github.com/sebastianbergmann/money",
    "license" : "BSD-3-Clause",
    "authors" : [{
            "name" : "Sebastian Bergmann",
            "email" : "[email protected]"
        }
    ],
    "require" : {
        "php" : ">=5.3.3",
        "ext-intl" : "*"
    },
    "require-dev" : {
        "phpunit/phpunit" : "~4.0"
    },
    "autoload" : {
        "classmap" : [
            "src/"
        ]
    },
    "extra" : {
        "branch-alias" : {
            "dev-master" : "1.3.x-dev"
        }
    }
}

Let me know if any other details is required..

Any feedback/help would be highly appreciated.


I encountered this using it in Mac, resolved it by using --ignore-platform-reqs option.

composer install --ignore-platform-reqs

PHP uses a different php.ini for command line php than for the web/apache php. So you see the intl extension in phpinfo() in the browser, but if you run php -m in the command line you might see that the list of extensions there does not include intl.

You can check using php -i on top of the output it should tell you where the ini file is loaded from. Make sure you enable the intl extension in that ini file and you should be good to go.

For php.ini 5.6 version (check version using php -v)

;extension=php_intl.dll 
; remove semicolon
extension=php_intl.dll

For php.ini 7.* version

;extension=intl
; remove semicolon
extension=intl