MacOS Sierra installing PHP Extension
I am trying to get magento 2.x to run on my machine. I am using xampp 5.6
with the same php version and running Apache virtual server.
As you can see in this screenshot PHP Extension. is absent.
I was looking into how it can be added / activated.
I tried uncommenting the extension in php.ini
xampp but it still seems to be missing.
I tried to follow this tutorial , but when I try to install intl with
sudo pecl install intl
it fails with
2 warnings and 1 error generated.
make: *** [php_intl.lo] Error 1
ERROR: `make' failed
source to share
You must provide an intl.so file that does not ship with XAMPP.
To fix this, you just need to follow these steps.
- Get intl.so file (explained below)
- Copy the intl.so file to / Applications / XAMPP / xamppfiles / lib / php / extensions / no -debug-non-zts- [some date] /
- Add a new line
extension=intl.so
to the end of your php.ini, which is usually found in /Applications/XAMPP/xamppfiles/etc/php.ini - Restart Apache Server
For different users, only the first step is different.
You should get the correct intl.so file.
if you have php 7.0 run brew install php70-intl
other versions should be php71-intl
or php56-intl
.
Your intl.so can be found at /usr/local/Cellar/php70-intl/[version]/intl.so
It should be similar for different php versions.
To copy it: open terminal
cd /usr/local/Cellar/php70-intl/[version]/
cp intl.so /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-[some date]/
Now add your entry to your php ini file and restart Apache.
source to share