Since I have started using Symfony2 on some projects I have been meaning to install the intl extension that Symfony recommends you install. I have tried several different methods, but believe that the one I listed below is easier and makes less of a mess than others. First, get the ICU libraries. Then expand them and build the library: tar xzvf icu4c-4_8_1_1-src.tgz cd icu/source ./runConfigureICU MacOSX make sudo make install
If you have followed from my previous steps, you should have the php headers installed in the standard MAMP directory. We need to go to the intl ext folder: cd /Applications/MAMP/bin/php/php5.3.6/include/php/ext/intl
From here, let’s build the intl.so file that we need to enable the extension: phpize ./configure –enable-intl make
Now we just need to copy the extension to the correct location and add an entry to our php.ini file: cp modules/intl.so /Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/ echo “extension=intl.so” >> /Applications/MAMP/bin/php/php5.3.6/conf/php.ini
Restart the MAMP servers and now you have the intl extension enabled!