Install/activate PHP "intl" extension running MAMP

31,117

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

Share:
31,117

Related videos on Youtube

Manne W
Author by

Manne W

Software engineer with focus on mobile platforms and the web.

Updated on January 03, 2020

Comments

  • Manne W
    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 :)

  • Manne W
    Manne W about 13 years
    Great! This one worked just fine! Will act as a self reminder for me too :)
  • szemian
    szemian about 13 years
    Glad 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
    LondonGuy almost 13 years
    Compiles 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
    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
    LondonGuy almost 13 years
    I 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
    szemian almost 13 years
    @Psychonetics, thanks for the update. I will keep that in mind in case I have the same issue.
  • linuxatico
    linuxatico almost 12 years
    This 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
    fishbaitfood over 11 years
    This seems to me the simplest way, thanks! I also enabled the apc.so accelerator like this, for Symfony2.
  • MS6
    MS6 about 11 years
    Nice, better solution than the "chosen" solution. Here's also a nice blog post with an alternative solution: blog.geertvd.be/2011/05/18/…
  • MS6
    MS6 about 11 years
    I 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 my intl.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
    MS6 about 11 years
    And if you keep getting an error, here's how to compile it yourself.
  • Carrie Kendall
    Carrie Kendall almost 11 years
    Great solution. For future visitors in need of a solution, this is the easiest solution! +1
  • Rafa
    Rafa almost 11 years
    FYI, 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
    geoidesic almost 5 years
    ditto for Mojave

Related