centos6和centos7手动扩展PHP的IMAP模块

发布时间:2020-08-02 06:55:57 作者:M四月天
来源:网络 阅读:3543


一、centos6.7 x64上手动扩展PHP的IMAP模块

1、准备

yum install -y libc-client-devel

ln -s /usr/lib64/libc-client.so /usr/lib/libc-client.so

ln -s /usr/lib64/libkrb5.so /usr/lib/libkrb5.so

ln -s /usr/lib64/libssl.so /usr/lib/libssl.so


2、安装

cd/usr/local/php-5.5.35/ext/imap/

/usr/local/php/bin/phpize

./configure -with-imap -with-php-config=/usr/local/php/bin/php-config --with-kerberos=/usr --with-imap-ssl=/usr

make

make install

centos6和centos7手动扩展PHP的IMAP模块


3、添加模块

vim /usr/local/php/etc/php.ini                     //添加

extension = "imap.so"

 

重启PHP

/etc/init.d/php-fpm restart

 

再次查看PHP模块,可以发现已经有imap模块了

centos6和centos7手动扩展PHP的IMAP模块

 

注意:./configure编译报错

报错1:configure: error:utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This shouldnot happen. Check config.log for additional information

解决:

yum install -y libc-client-devel

ln -s /usr/lib64/libc-client.so /usr/lib/libc-client.so

 

报错2:configure: error:Kerberos libraries not found.  Check thepath given to --with-kerberos (if no path is given, searches in /usr/kerberos,/usr/local and /usr )

解决:ln -s /usr/lib64/libkrb5.so /usr/lib/libkrb5.so

 

报错3:configure: error:Cannot find OpenSSL's libraries

解决:ln -s /usr/lib64/libssl.so /usr/lib/libssl.so

 

重新./configure编译即可。




二、centos7.0.1406 x64上手动扩展PHP的IMAP模块

1、安装 php-imap

yum install -y pam-devel

cd /usr/local/src/

wget ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz

tar -zxvf imap-2007f.tar.gz

cd imap-2007f

make lr5 PASSWDTYPE=std SSLTYPE=unix.nopwd EXTRACFLAGS=-fPIC IP=4

 

mkdir /usr/local/imap-2007f/

mkdir /usr/local/imap-2007f/include/

mkdir /usr/local/imap-2007f/lib/

cp c-client/*.h /usr/local/imap-2007f/include/

cp c-client/*.c /usr/local/imap-2007f/lib/

cp c-client/c-client.a /usr/local/imap-2007f/lib/libc-client.a

 

2php手动加载php-imap

cd /usr/local/php-7.1.0/ext/imap/

/usr/local/php/bin/phpize

./configure -with-imap=/usr/local/imap-2007f -with-php-config=/usr/local/php/bin/php-config --with-imap-ssl=/usr

make

make install

centos6和centos7手动扩展PHP的IMAP模块



注意:./configure编译报错

报错:configure: error:Cannot find OpenSSL's libraries

解决:确认已安装过openssl、libssl-dev 包,但是还是会提示该错误

find / -name libssl.so                         //查找到路径为:/usr/lib64/libssl.so

ln -s /usr/lib64/libssl.so /usr/lib


重新编译即可



3、添加php-imap模块

vim /usr/local/php/etc/php.ini                      //添加

extension ="imap.so"

 

重启PHP

/etc/init.d/php-fpm restart

 

再次查看PHP模块,可以发现已经有imap模块了

centos6和centos7手动扩展PHP的IMAP模块





推荐阅读:
  1. 简述centos6和centos7开机过程
  2. php添加扩展模块

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

php imap ce

上一篇:SWAP_JOIN_INPUTS Oracle Hint

下一篇:You don't have permission to access / on this server.

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》