简体   繁体   中英

How can I enable IMAP modules in PHP on Mac OS 10.8

I have Apache server on Mac OS 10.8. I need module IMAP to be enabled in PHP. I followed this instruction http://blog.xeonxai.com/2009/12/03/160/ . I have installed imap.so and link it in php.ini file like this

extension=/usr/lib/php/extensions/no-debug-non-zts-20090626/imap.so

But I cannot get IMAP modules when print out phpinfo() as well as imap_open function. What's wrong with my web server ?

Thanks for helping !

This is what I did to have the IMAP module working:

  1. Install php56 with IMAP enabled using brew: brew install php56 --with-imap
  2. Edit http.conf and replace the line loading PHP (LoadModule php5_module libexec/apache2/libphp5.so) with the newly installed PHP: LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so
  3. Restart apache: sudo apachectl restart

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM