Php-intl installation on XAMPP

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

  1. Check which php path is set i.e.

    root$: which php
    
  2. 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}" 
    
  3. Install icu4c

    root$: brew install icu4c 
    
  4. Install Intl via PECL

    root$: sudo pecl update-channels 
    root$: sudo pecl install intl 
    
  5. 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

    • 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-*
      

Leave a Comment