Mamp install php intl extension

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 :)

As a Symfony developer you run into translations sooner or later. This is a very powerful component of the framework. But requires some additional configuration of your MAMP environment before you can start using it. I’ll explain to you in short how.

First, grab the ICU libraries and build them:

$ curl -O http://download.icu-project.org/files/icu4c/4.8.1.1/icu4c-4_8_1_1-src.tgz
$ tar xzvf icu4c-4_8_1_1-src.tgz
$ cd icu/source
$ ./runConfigureICU MacOSX
$ make && sudo make install

Now you have to install the PHP INTL extension with PECL. Make sure you’ve added the MAMP PHP binary directory to your $PATH environment variable. Then run the following command to install the INTL extension:

The last thing to do is add the extension=intl.so line to the php.ini file, so do that. Restart your shell and MAMP environment so they reflect the changes to the ini file.

FAQ > PHP

Install a PHP Extension using PECL

MAMP PRO provides you with all the requirements to install PHP Extensions using PECL. This guide shows you how to install a PHP Extension via PECL using the mongodb extension and PHP 8.0.2 as an example.

  1. Open MAMP PRO and click on the “PHP” entry in the sidebar in the “Languages” area.
  2. Activate the “Activate command line shortcuts for the selected PHP version, pear & pecl” checkbox.
  3. Restart your servers. A PECL alias now exists in your “~/.profile”, “.profile” and “.zprofile” file.
  4. Open the Terminal app (/Applications/Utilities). Tip: If you have already opened the terminal app, then you must close and reopen it for the changes to the configuration files “~/.profile”, “.profile” and “.zprofile” to take effect.
  5. Change to the “/Applications/MAMP/bin/php/php8.0.2/bin” directory.

    cd /Applications/MAMP/bin/php/php8.0.2/bin
    

  6. Enter the following command and confirm your entry with Enter.
  7. If you are shown the message “Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.”, then you need to perform the following steps:

    1. Enter the following commands in the terminal and confirm each command with Enter. The asterisk at the command autoconf-* stands for the corresponding version number (for example “2.71”).

      curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-latest.tar.gz
      tar xzf autoconf-latest.tar.gz
      cd autoconf-*
      ./configure --prefix=/usr/local
      make
      sudo make install
      

    2. Use the following commands in the Terminal to switch back up one directory level and restart the PHP extension installation process:

      cd ..
      pecl install mongodb
      

    3. Your PHP Extension should now build and you should see the following result:

      Build process completed successfully
      Installing '/Applications/MAMP/bin/php/php8.0.2/lib/php/extensions/no-debug-non-zts-20200930/mongodb.so'
      install ok: channel://pecl.php.net/mongodb-1.9.1
      configuration option "php_ini" is not set to php.ini location
      You should add "extension=mongodb.so" to php.ini
      

  8. A “mongodb.so” extension should now be in your “/Applications/MAMP/bin/php/php8.0.2/lib/php/extension/no-debug-non-zts-x” folder.
  9. Switch back to MAMP PRO and select “8.0.2” from the “File > Open Template > PHP (php.ini)” menu.
  10. The template for the php.ini file of PHP version 8.0.2 is opened. Insert the following line into it:

    Mamp install php intl extension

  11. Save and close the template.
  12. Restart your servers and verify the extension has been loaded by checking phpInfo. Please make sure that the host you use to call the phpInfo output is also set to the corresponding PHP version for which you have installed the PHP extension - in our case in this example this is PHP 8.0.2.
    Mamp install php intl extension

How do I enable PHP extensions in Mamp?

Open MAMP PRO and click on the “PHP” entry in the sidebar in the “Languages” area. Activate the “Activate command line shortcuts for the selected PHP version, pear & pecl” checkbox. Restart your servers.

How do I install or enable PHP's intl extension?

How to install Intl extension in Xampp ?.
Open [xampp_folder_path]/php/php. ini to edit..
search for – extension=php_intl.dll ;extension=php_intl.dll. and uncomment the line by removing semicolon. extension=php_intl.dll..
save the file and restart Apache..

What is PHP module Intl?

The Internationalization extension (Intl) is a wrapper for the ICU library, a set of C/C++ and Java libraries that provide Unicode and Globalization support for software applications. It enables PHP programmers to perform UCA-conformant collation and date/time/number/currency formatting in their scripts.

What does Mamp Pro do?

MAMP Pro allows you to store your files in the cloud via Dropbox or OneDrive. You can store one, or all of your hosts in the cloud. This is a great way to protect you from accidentally deleting files on your projects, and allows you to work on sites on different computers.