Install/activate PHP "intl" extension running MAMP
Solution 1
I just compiled on mine the other day.
I wrote a self reminder post here: http://szemian.wordpress.com/2011/03/21/compiling-intl-extension-for-mamp/
Let me know if you need further explanation. :)
Solution 2
The best way is to download PHP for OSX at http://php-osx.liip.ch/ and then copy the intl.so
file from
/usr/local/php5-20121126-100332/lib/php/extensions/no-debug-non-zts-20100525/intl.so
to
/Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-non-zts-20100525/intl.so
Worked like a charm for me for PHP 5.4
Related videos on Youtube
Manne W
Software engineer with focus on mobile platforms and the web.
Updated on January 03, 2020Comments
-
Manne W over 4 years
Ok, I'm running MAMP 1.9.5, which includes PHP 5.3.5, on my MacBook Pro.
The "intl" extension isn't included/activated and I've tried a lot of different ways to install it ("./pecl install intl" doesn't seem to do it), but can't make it work.
I've also "googled my ass of" but can't find any hints.
Anyone of you that know how to do it? Or, alternatively, have and advice on how to install my own MySQL+Apache+PHP (and include "intl")?
I'm trying to do this to be able to run Symfony2. So if you have any advice on how to install MySQL+Apache+PHP+Symfony2 on Mac, thats also welcome :)
-
igorwNote that there is a stub implementation of intl included with Symfony2 which will provide you with the bare minimum of functionality for the 'en' locale. The standard edition loads the stubs by default: github.com/symfony/symfony-standard/blob/master/app/…
-
-
Manne W about 13 yearsGreat! This one worked just fine! Will act as a self reminder for me too :)
-
szemian about 13 yearsGlad it works! :) To be honest I haven't used it as I haven't worked on form validation yet. Please leave a comment if the extension is not working as expected.
-
LondonGuy almost 13 yearsCompiles for me and symfony2 stops asking me to install and enable it but it fails make test and gives me errors when i try to create a date field in forms
-
szemian almost 13 years@Psychonetics, I still haven't developed much on form and validation, just playing with the examples on the official documentation. I did not have any error when I tried a date form field type and validate it on latest beta. Would you elaborate the errors?
-
LondonGuy almost 13 yearsI solved my issue by downloading and install zend server ce, I took the compiled intl.so and added it to my MAMP setup and it worked fine. I decided to just use zend server ce instead as it has many other extensions pre-installed. Date field is working fine and i'm getting 0 errors.
-
szemian almost 13 years@Psychonetics, thanks for the update. I will keep that in mind in case I have the same issue.
-
linuxatico almost 12 yearsThis solution did not work for me, the "make" step just after the "./configure –enable-intl –with-icu-dir=/Applications/MAMP/Library/" failed because of a bunch of errors, the first is "In file included from /Users/simone/Downloads/php-5.3.10/ext/intl/php_intl.c:25: /Users/simone/Downloads/php-5.3.10/ext/intl/php_intl.h:23:17: error: php.h: No such file or directory" I solved by installing Macports and following this guide: blog.geertvd.be/2011/05/18/…
-
fishbaitfood over 11 yearsThis seems to me the simplest way, thanks! I also enabled the apc.so accelerator like this, for Symfony2.
-
MS6 about 11 yearsNice, better solution than the "chosen" solution. Here's also a nice blog post with an alternative solution: blog.geertvd.be/2011/05/18/…
-
MS6 about 11 yearsI using the right
php.ini
file, but it wasn't working. I found a PHP startup log saying the extension wasn't compiled with the same module as PHP so myintl.so
extension was not loading.PHP Warning: PHP Startup: intl: Unable to initialize module Module compiled with module API=20090626 PHP compiled with module API=20100525 These options need to match
This comment helped me and this guys keeps a version of intl.so up-t-date for MAMP -
MS6 about 11 yearsAnd if you keep getting an error, here's how to compile it yourself.
-
Carrie Kendall almost 11 yearsGreat solution. For future visitors in need of a solution, this is the easiest solution! +1
-
Rafa almost 11 yearsFYI, won't work with MAMP 1.9 (php 5.3.2, same as Ubuntu 10.0.4 LTS) in Snow Leopard due to diferent architecture "intl.so: mach-o, but wrong architecture"
-
geoidesic almost 5 yearsditto for Mojave