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:
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()
:
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:
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.
Composer has platform packages, which are virtual packages for things that are installed on the system but are not actually installable by Composer. This includes PHP itself, PHP extensions and some system libraries.
I encountered this using it in Mac, resolved it by using --ignore-platform-reqs
option.
composer install --ignore-platform-reqs
After installing with this method, if the package that defines the requirement attempts to use any functions from the specified PHP extension, it will fail irrevocably.
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
In linux (Debian Jessie for example):
apt-get install php7.0-intl
will make the job to you due will create a simbolic link to it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With