duanbing2963 2015-11-04 17:56
浏览 90
已采纳

在OSX El Capitan上为PHP添加imap扩展

I'm working on a project where I need imap_open() function and I just bought my first Macbook Pro with OSX El Capitan on it.

I activated the extension in php.ini but the .so file is missing, searching on how to install imap extension doesn't work on El Capitan and while compiling I get error osdep.c:170:10: fatal error: 'x509v3.h' file not found

Anyone know what should I install in order to get that header file or is there any easy way to install extension like on Linux (yum install php5-imap, apt-get install php5-imap) ?

  • 写回答

4条回答 默认 最新

  • dourao3960 2015-11-24 13:36
    关注

    I had the same issue last week and managed to solve it. The problem is that imap make file assumes that your open ssl is located at /usr/include/openssl while on my mac it was at /usr/local/Cellar/openssl/1.0.2d_1/include/openssl

    You can use locate x509v3.h to find exact path

    Following the steps from here ... After step cd imap-2007f

    open the Makefile, search for OSX and change the ssl include path to your path

    That should solve compiling problems, so you will be able to go on till the last step where you need to copy imap.so to /usr/lib/php which will not be possible because of new SIP feature on El Capitan

    Have a look here how to override this restriction I hope it helps

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改
  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法