Installing PHP INTL in mac not getting it right
Asked Answered
R

2

4

I have installed php56-intl using Homebrew like so: brew install php56-intl and when I do php -m | grep intl it gives me intl

But when I check in my phpinfo() file, doesn't show up intl.

Not sure what am I missing.

Update

All I want to install intl in my computer so that I could run my zend application. But whatever I do I don't get it done.

An error occurred An error occurred during execution; please try again later.

Additional information:

Zend\I18n\Exception\ExtensionNotLoadedException File: /Applications/XAMPP/xamppfiles/htdocs/skeleton/vendor/zendframework/zend-i18n/src/Filter/AbstractLocale.php:24

Message:

Zend\I18n\Filter component requires the intl PHP extension

Readytowear answered 27/6, 2015 at 4:15 Comment(5)
provide some codes related to answerDuct
All I want to install intl in my computer so that I could run my zend application. But whatever I do I don't get it done.Readytowear
Anyone any idea on this?Readytowear
I have exactly same problem with xampp on mac os. if you solved it already then please post answer here.Analgesia
I had added answer below, that worked for me.Readytowear
R
5

The problem was, intl was installed in my mac but not in XAMPP.

Alright, after long hassle here how I succeeded:

Go to your terminal and

cd /Applications/XAMPP/bin

Then php -m | grep intl, if it returns you intl then it is installed. If not installed then should return empty.

Now, sudo ./pecl install intl

Will ask specify where ICU libraries and headers can be found, simply hit enter,

And this will install intl, also will return this message You should add "extension=intl.so" to php.ini.

So simply add this to your php.ini file and restart your apache: sudo apachectl restart or hard restart from XAMPP itself.

Hope this helps someone else.

Readytowear answered 12/7, 2015 at 6:29 Comment(1)
Doesn't work for me: " checking for location of ICU headers and libraries... not found configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works."Ruthannruthanne
P
0

I encountered similar issue with OsX default php and not having the intl extension. This is what solved my issue:

  1. brew install php56 (make sure you have hombebrew installed)
  2. in your httpd.conf Find line LoadModule php5_module libexec/apache2/libphp5.so, comment it
  3. Add below that line : LoadModule php5_module /usr/local/opt/php53/libexec/apache2/libphp5.so, for your case just change the php53 to php54.
Pipe answered 10/8, 2016 at 7:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.