I need to use the extension intl on my mac with XAMPP.
So I have followed this links:
Php-intl installation on XAMPP for Mac Lion 10.8
http://lvarayut.blogspot.it/2013/09/installing-intl-extension-in-xampp.html
I restart always my apache server but isn't installed the extension. Because if I launch:
php -m | grep intl #should return 'intl'
return empty
The command that I can't launch without it is for composer and cakephp like this:
composer create-project --prefer-dist -s dev cakephp/app cakephp3
Return me this error:
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for cakephp/cakephp 3.0.*-dev -> satisfiable by cakephp/cakephp[3.0.x-dev].
- cakephp/cakephp 3.0.x-dev requires ext-intl * -> the requested PHP extension intl is missing from your system.
Problem 2
- cakephp/cakephp 3.0.x-dev requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/bake dev-master requires cakephp/cakephp 3.0.x-dev -> satisfiable by cakephp/cakephp[3.0.x-dev].
- Installation request for cakephp/bake dev-master -> satisfiable by cakephp/bake[dev-master].
So I need to solve the problem of ext-intl with the extension intl.
Can someone help me with this problem? How can I install this extension?
Thanks
The Internationalization extension (Intl) is a wrapper for the ICU library, a set of C/C++ and Java libraries that provide Unicode and Globalization support for software applications. It enables PHP programmers to perform UCA-conformant collation and date/time/number/currency formatting in their scripts.
Go to your php. ini file and add the following line: extension=<extension_name>. dll. To verify that the extension was loaded properly, go to Setup | Extensions and locate the extension from the list.
These below steps helped me, Just in case if you are using OSX
Steps from http://www.phpzce.com/blog/view/15/installing-intl-package-on-your-mac-with-xampp
Check which php path is set i.e.
root$: which php
If you are using xampp on your mac it should be
/Applications/XAMPP/xamppfiles/bin/php
but if its
/usr/bin/php
you need to change your OSx php
root$: PATH="/Applications/XAMPP/xamppfiles/bin:${PATH}"
Install icu4c
root$: brew install icu4c
Install Intl via PECL
root$: sudo pecl update-channels
root$: sudo pecl install intl
You can check if Intl was installed successfully
root$: php -m | grep intl #should return 'intl'
Done
============================
Note:
From extensions list in /Applications/XAMPP/xamppfiles/etc/php.ini
file Add / Uncomment extension=intl.so
line. And restart Apache. Thanks @pazhyn
Before installing "intl" you have to install Autoconf if you have not installed it. Thanks @Digant
by running below commands
curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-latest.tar.gz
tar xzf autoconf-latest.tar.gz
cd autoconf-*
./configure --prefix=/usr/local
make
sudo make install
cd ..
rm -r autoconf-*
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