2

I use version 2.2 of MAMP PRO with PHP 5.5.3. I use port to install the packages. I installed php5-intl and I copied the file intl.so in /Applications/MAMP/bin/php/php5.5.3/lib/php/extensions/no-debug-non-zts-20121212. I called the extension in the php.ini file via> Edit config> php> php5.5.3.ini because I have the pro version of mamp. After restarting servers and display phpinfo () the extension is not loaded. I tried to call the extension directly in php.ini like this "extension = '/ Applications/MAMP/bin/php/php5.5.3/lib/php/extensions/no-debug-non-zts-20121212 /intl.so' but it does not work.

I do not see why extension is not loaded could you help me please ?

Best regards,

Bostak
  • 93
  • 2
  • 9

1 Answers1

7

Step 1:

With the terminal execute the following command:

curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5

Once done go to the folder:

/usr/local/php5 <version-number> /lib/php/extensions/no-debug-non-zts- <version-number> 

Copy the file intl.so and pasted it in the folder of MAMP for me:

/Applications/MAMP/bin/php/php5.5.3/lib/php/extensions/no-debug-non-zts- <version-number>

Step 2:

Edit php.ini the following path:

/Applications/MAMP/bin/php/php5.5.3/conf/

Once opened with textEdit search part :

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;

Add the following line JUST BEFORE:

extension=intl.so

which should include:

; Extensions

extension=apc.so

extension=imap.so
extension=yaz.so
extension=mcrypt.so
extension=gettext.so
extension=pgsql.so
extension=pdo_pgsql.so
extension=pdo_mysql.so
extension=intl.so

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;

Step 3:

Restart your MAMP server.

Jose Serrano
  • 71
  • 1
  • 2
  • Further reading https://medium.com/@gustavoaragon/how-to-install-intl-so-on-yosemite-10-10-2-mamp-pro-for-cakephp-3-0-e81a9ca7d0d1 – leymannx Mar 17 '18 at 23:01
  • 2
    Any update for 2019? I tried this and got the following warning (which sounds pretty bad): `Detected macOS Mojave 10.14. There are serious issues with it, due to the original apache not loading foreign libraries anymore. PHP within apache will most certainly not work anymore if you proceed! The cli version still will. See this issue at https://github.com/liip/php-osx/issues/249 for details and discussion` – geoidesic Jun 11 '19 at 15:00