doushi8231 2019-06-11 18:58
浏览 175

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

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:
    /usr/local/etc/php/7.1/
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!

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥20 腾讯企业邮箱邮件可以恢复么
    • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
    • ¥15 错误 LNK2001 无法解析的外部符号
    • ¥50 安装pyaudiokits失败
    • ¥15 计组这些题应该咋做呀
    • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
    • ¥15 让node服务器有自动加载文件的功能
    • ¥15 jmeter脚本回放有的是对的有的是错的
    • ¥15 r语言蛋白组学相关问题
    • ¥15 Python时间序列如何拟合疏系数模型