linux 下安装PHP的IMAP扩展实现邮件收发

系统CentOS 6.5 PHP5.5.19

1、安装imap的依赖包:

[root@iZ9482lp6yqZ]# yum install -y libc-client-*

 没有安装编译错误提示:

configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.

解决Cannot find imap library (libc-client.a)错误提示:

[root@iZ9482lp6yqZ]# ln -s /usr/lib64/libc-client.so /usr/lib/libc-client.so

 2、进入php源码中的imap目录

[root@iZ9482lp6yqZ no-debug-non-zts-20090626]# cd /usr/local/php-5.5.19/ext
[root@iZ9482lp6yqZ imap]# /usr/local/php/bin/phpize
[root@iZ9482lp6yqZ imap]# ./configure --with-php-config=/usr/local/php/bin/php-config --with-imap --with-imap-ssl --with-kerberos
[root@iZ9482lp6yqZ imap]# make
[root@iZ9482lp6yqZ imap]# make install

3、把imap.so扩展加到php.ini:

extension = imap.so

 4、重启httpd:

[root@iZ9482lp6yqZ conf]# service httpd restart

 

posted @ 2015-05-13 15:17  蚂蚁小圆  阅读(2334)  评论(0编辑  收藏  举报