Home >Backend Development >PHP Tutorial >How to Successfully Install Php-intl on XAMPP for Mac Users?
Php-intl Installation on XAMPP: Resolving Challenges for Mac Users
When working with XAMPP on Mac, the Php-intl extension becomes crucial for various applications, including composer and cakephp. Users may encounter difficulties in installing this extension, leading to errors such as the inability to launch commands that require it.
Step-by-Step Installation Guide
To successfully install the Php-intl extension, follow these steps:
which php
If the output is /Applications/XAMPP/xamppfiles/bin/php, then proceed with the next steps. However, if it is /usr/bin/php, modify the system PHP path using this command:
PATH="/Applications/XAMPP/xamppfiles/bin:${PATH}"
brew install icu4c
sudo pecl update-channels sudo pecl install intl
php -m | grep intl #should return 'intl'
Additional Notes
brew install autoconf automake
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-*
The above is the detailed content of How to Successfully Install Php-intl on XAMPP for Mac Users?. For more information, please follow other related articles on the PHP Chinese website!