dpcnm2132 2017-04-28 22:32
浏览 384

在mac os sierra和MAMP上安装php Imap

Im trying to edit a web app on my local host and I am getting the following error: Call to undefined function imap_open()

I believe this is because I may not have imap installed or activated on my localhost. I am currently running Mac OS Sierra and MAMP (not MAMP Pro)

I find some things online for older versions of Mac OS or using Brew but I don't use brew, is this necessary to get imap working on my setup? Can someone help me so I don't run into these imap issues?

  • 写回答

1条回答 默认 最新

  • douyu9012 2018-11-14 16:58
    关注

    I also had extension=imap.so set in the PHP.ini file, but IMAP still wasn't supported. I finally found what worked for me and hopefully will for your situation as well.

    The next thing to make sure of is that extension_dir is correctly set in the same PHP.ini file. Mine was set to MAMP_extension_dir_MAMP. I didn't see where this variable was set. I replaced it with "/Applications/MAMP/bin/php/php5.3.29/lib/php/extensions/no-debug-non-zts-20090626/" and now when I look up phpinfo() page I see that IMAP is enabled.

    replace php5.3.29 with your php version and no-debug-non-zts-20090626 with whatever folder name you see in the extensions folder.

    评论

报告相同问题?