参考:
http://blog.hexu.org/archives/1822.shtml
http://blog.chinaunix.net/uid-10449864-id-2956925.html
进入最初的安装目录
cd /path/ext/imap
/usr/local/webserver/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-imap --with-imap-ssl --with-kerberos
我的报错:
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
解决方法:yum -y install libc-client-*
再次:
./configure --with-php-config=/usr/local/php/bin/php-config --with-imap --with-imap-ssl --with-kerberos
ok,我通过了
ubuntu下--with-kerberos对应的安装包是libkrb5-dev,centos下对应包是krb5-devel
下面接着:
make
make install
将模块加入php.ini:
vim /etc/php/php.ini
添加如下配置:
[imap]
extension = imap.so
查看是否成功:
执行:php -m | grep imap
imap ## 看到imap,说明成功安装了
阅读(2182) | 评论(0) | 转发(0) |