Can't install php Intl extension on MacosX
ICU stands for ICU - International Components for Unicode
Install it with brew
brew update
brew search icu # returns 'icu4c'
brew install icu4c
OR
Install it with pecl
sudo pecl update-channels
sudo pecl install intl
installing intl package on osx
Install PHP Internationalization extension (Intl) on XAMPP on Mac
Installing "intl" extension on OSX.
- Normally, the PHP is automatically installed on OSX.
So, if you would like to use the XAMPP, or whatever apache server, you must change the path point to XAMPP. You can check the path by using:
$ which php
You should get
/Applications/XAMPP/xamppfiles/bin/php
if not, you will get
/usr/bin/php.
This is OSX' php. So, you have to change it by using:
$ PATH="/Applications/XAMPP/xamppfiles/bin:${PATH}"
- Now, it's time to install intl. Firstly, you need to install icu4c
$ brew install icu4c
It takes a couple of times and returns its path to you, should look something like this:
/usr/local/Cellar/icu4c/x.x.x
- Next, let's install intl by using pecl
$ sudo pecl update-channels
$ sudo pecl install intl
It will prompt you to put the icu4c path.
After finish installing icu4c, put the following statement to php.ini
extension=intl.so
- Restart apache. and check whether it's neatly installed.
$ php -m | grep intl
should return 'intl'
That's it!
Mac 10.6 - unable to install PHP intl
I've installed Zend Server CE and everything works 100%.
I removed Zend Server CE later on, and used this instead:
http://php-osx.liip.ch/ which is specifically built for Mac OSX 10.6, and Symfony2 in mind.
This worked better for me in the end, as I'm a Netbeans user, this means I can use xdebug bundled with the liip distribution.
I found it a bit cumbersome getting xdebug installed on Zend Server CE, and also, the liip PHP installation doesn't install an additional Apache and MySQL, it uses what is already included with the OS.
Related Topics
Sending Data Using Post in Python to PHP
How to Convert Multiple <Br/> Tag to a Single <Br/> Tag in PHP
Pdo Bindparam into One Statement
Change Database Connection in Laravel Model
Google API How to Connect to Receive Values from Spreadsheet
How to Swap Colors in Image Using Gd Library in PHP
PHP Send Email with Attachment
How to Add a Watermark to an Existing PDF File Using PHP
[PHP Warning: Mail(): " Sendmail_From" Not Set in PHP.Ini or Custom "From:" Header Missing
Answering Http_If_Modified_Since and Http_If_None_Match in PHP
How Download Big File Using PHP (Low Memory Usage)
Difference Between Require and Install VS Create-Project in Composer
PHP - Implement Logging Mechanism to File in Several Classes
How to Use Prepared Statements with Postgres