PHP 7.1 iMap扩展在Mojave上安装后不显示

我一直在尝试在MAC Mojave 10.14.5上启用PHP 7.1 iMap扩展,但我还没有 运气好运。 任何帮助将不胜感激。 </ p>

在任何安装之前, php -v </ code>返回 7.1.23 </ code>和,其中php </ code>返回 / usr / bin / php </ code>因为Mojave预装了PHP 7.1。 但是, php -m </ code>不包含iMap,因为默认情况下未安装扩展。 </ p>

我试图点击 kabel / php-ext </ code>或者

v1shky / php-ext </ code>和< code> brew install php@7.1-imap </ code>,在安装过程中得到以下信息:</ p>

 可以找到php.ini和php-fpm.ini文件 在:
php@7.1是keg-only,这意味着它没有符号链接到/ usr / local,
如果你 需要在PATH运行中首先使用php@7.1:
echo'export PATH =“/ usr / local / opt / php @ 7.1 / bin:$ PATH”'&gt;&gt; 〜/ .bash_profile
echo'export PATH =“/ usr / local / opt / php @ 7.1 / sbin:$ PATH”'&gt;&gt; 〜/ .bash_profile
export LDFLAGS =“ - L /usr/local/opt/php@7.1/lib”
export CPPFLAGS =“ - I / usr / local/opt/php@7.1/include“**
</ code> </ pre>

当我检查时, php -v </ code>返回 7.1。 30 </ code>,,其中php </ code>返回 / usr / local / bin / php </ code>和 php -m </ code>仍然不包含iMap。< / p>

然后我按照指令修改bash_profile,现在 php -v </ code>返回 7.1.30 </ code>和哪个php </ code>返回 /usr/local/opt/php@7.1/bin/php </ code>。 但是, php -m </ code>仍然不包含iMap。</ p>

是否有更好的方法为Mojave附带的现有PHP 7.1添加iMap扩展? 如果没有,在使用HomeBrew时还有什么我应该做的,以便它可以工作吗? </ p>

顺便说一下,由于我们正在使用的其他一些框架,我必须继续使用PHP 7.1而不是升级到7.2或7.3。 </ p>

提前致谢!</ p>
</ div>



I have been trying to enable PHP 7.1 iMap extension on MAC Mojave 10.14.5, but I haven't had any luck getting it to work. Any help will be greatly appreciated.

Before any installation, php -v returns 7.1.23 and which php returns /usr/bin/php since Mojave has PHP 7.1 preinstalled. However, php -m doesn't include iMap since the extension is not installed by default.

I have tried to tap with either kabel/php-ext or
v1shky/php-ext and brew install php@7.1-imap, got the following in the installation process:

The php.ini and php-fpm.ini file can be found in:
php@7.1 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have php@7.1 first in your PATH run:
  echo 'export PATH="/usr/local/opt/php@7.1/bin:$PATH"' >> ~/.bash_profile
  echo 'export PATH="/usr/local/opt/php@7.1/sbin:$PATH"' >> ~/.bash_profile
For compilers to find php@7.1 you may need to set:
  export LDFLAGS="-L/usr/local/opt/php@7.1/lib"
  export CPPFLAGS="-I/usr/local/opt/php@7.1/include"**

And when I check, php -v returns 7.1.30, which php returns /usr/local/bin/php and php -m still doesn't include iMap.

Then I followed the instruction to modify bash_profile, and now php -v returns 7.1.30 and which php returns /usr/local/opt/php@7.1/bin/php. However, php -m still doesn't include iMap.

Is there a better way to add the iMap extension for the existing PHP 7.1 that comes with Mojave? If not, is there anything else I should do when using HomeBrew so that it would work?

By the way, I have to stay on PHP 7.1 instead of upgrading to 7.2 or 7.3 due to some other frameworks we are using.

Thanks in advance!

Csdn user default icon