Problems to install php intl with Xampp (MacOs)
Asked Answered
T

1

11

I´m installed Xampp in my Mac, the last version with Php7, all works fine, but in my Php proyect I´m using this function:

numfmt_format_currency() 

I need install the intl, and edit the php.ini with this line:

extension="intl.so”

The problem is, I can´t install the intl, I use this command:

sudo pecl install intl

But returns me this console error:

/private/tmp/pear/temp/intl/intl_error.h:24:10: fatal error: 'ext/standard/php_smart_str.h' file not found
#include <ext/standard/php_smart_str.h>
         ^
1 error generated.
make: *** [php_intl.lo] Error 1
ERROR: `make' failed

After, I try download the ntl-3.0.0.tgz from here, and Install whith this command:

sudo pear install intl-3.0.0.tgz

But return me this:

No releases available for package "pear.php.net/intl" - package pecl/intl can be installed with "pecl install intl"
install failed

I'm desperate, how can I install intl?

Trishatriskelion answered 19/11, 2016 at 9:18 Comment(8)
Did you find a solution to this?Howlyn
nope man.......Trishatriskelion
What about now?Orthogenic
could you find a solution to this?Mikkimiko
Not solution :(Trishatriskelion
have you tried using brew instead to manage php and install this extension?Equites
Any one found the solutions ?????Epperson
Have you given my answer a try? I am no longer using a Mac, but it did work when I worked on one. A feedback is appreciated.Christner
C
1

You can use a PHP package from https://php-osx.liip.ch/. It already includes the intl extension.

This package installs the (usually) latest PHP 7.2/7.1/7.0/5.6/5.5/5.4/5.3 on OS X 10.6 (aka Snow Leopard), OS X 10.7 (aka Lion) and OS X 10.8 (aka Mountain Lion) and OS X 10.9 (aka Mavericks) and OS X 10.10 (aka Yosemite) and OS X 10.11 (aka El Capitan) and macOS 10.12 (aka Sierra) and macOS 10.13 (aka High Sierra) in /usr/local/php5. It installs many useful extensions (see below) and ini-settings and is what we at Liip use for our development. It's especially suited for Symfony 2 development. It also provides a decent php.ini with all settings configured according to "Best Practices".

Installation of PHP 7.2 is done via curl -s https://php-osx.liip.ch/install.sh | bash -s 7.2.

For more information have a look at the site and FAQ section.

Christner answered 12/6, 2018 at 23:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.