- Open terminal application
- Enter “which php" and if it says “/usr/bin/php”, then proceed to step 3.
- Enter: sudo nano ~/.bash_profile
- Then paste this:
export XAMPP_HOME=/Applications/XAMPP
export PATH=${XAMPP_HOME}/bin:${PATH}
export PATH
- Ctrl+O then ENTER to save, then Ctrl+X to exit.
- Type: cd ~
- Type: . .bash_profile
- Restart terminal.
- Enter which php and if you did it right, it should be the same as the path in #4.
Before you install intl you have to install Autoconf if you don’t have installed it yet. In your terminal execute following commands:
cd ~ && curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz
tar -zxvf autoconf-latest.tar.gz
cd autoconf-2.69
./configure
make
sudo make install
Download PEAR curl -O http://pear.php.net/go-pear.phar sudo php -d detect_unicode=0 go-pear.phar Configure and Install PEAR You should now be at a prompt to configure PEAR.
Type 1 and press return. Enter:
/usr/local/pear Type 4 and press return. Enter:
/usr/local/bin Press return Verify PEAR You should be able to type:
pear version
And now let’s install the intl extension. In your terminal issue the following command: sudo pecl install intl
When you are prompted for the location of ICU, simply enter “/usr/local” or simply hit return key. When the installation is finished you should add “extension=intl.so” into your php.ini file that should be located under “/XAMPP/xamppfiles/etc/” directory.
To check the location of your php.ini file in terminal issue command: “php --ini”
The last step is to clean up the temporary folder. To do so enter following commands:
cd ~ rm -rf autoconf-2.69
The solution for installing the PHP intl extension was taken from Coding Explained