Member-only story
Fatal error: Class ‘NumberFormatter’ not found & php intl extension MAC OSX xampp php_v5.6
- Check which php path
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-channelsroot$: sudo pecl install intl
You can receive the message below:
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
Check you php.ini file ( /Applications/XAMPP/xamppfiles/etc/php.ini)
;extension=php_intl.dllextension=intl.so
- You can check if Intl was installed successfully
root$: php -m | grep intl #should return ‘intl’
