Php-intl installation on XAMPP
I had issues with intl when using Moodle, which I fixed by doing the following:
- Re-run the XAMPP installer (if you don't have the installer on hand, download it from here) and tick the "XAMPP Developer Files"
- Use your terminal and go into XAMPP's binary folder
$ cd /Applications/XAMPP/bin
Use PHP's package manager to install
intl
by running$ sudo ./pecl install intl
This should compile some things, and if successful, the installation should complete with:Build process completed successfully Installing '/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226/intl.so' install ok: channel://pecl.php.net/intl-3.0.0 configuration option "php_ini" is not set to php.ini location You should add "extension=intl.so" to php.ini
$ cd ../etc
There you will have yourphp.ini
to which you have to addextension=intl.so
On my system I appended the line after line 959, which you can find by searching forphp_intl
- Finally restart your Apache web server from the XAMPP GUI.
Hope this works for you!
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 / Uncommentextension=intl.so
line. And restart Apache. Thanks @pazhynBefore installing "intl" you have to install Autoconf if you have not installed it. Thanks @Digant
- via Homebrew brew install autoconf automake or
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-*