Home > Backend Development > PHP Tutorial > centOS6 php 编译 imap 模块

centOS6 php 编译 imap 模块

WBOY
Release: 2016-06-23 13:45:04
Original
1181 people have browsed it

php 编译 c-client imap 客户端.下载地址 http://www.washington.edu/imap/mirrors.html

第一步,编译 c-client

官方文档说到底有点坑,编译报错 “错误:x509v3.h:没有那个文件或目录”,搜了下论坛,使用下面的命令编译通过

 make slx SSLINCLUDE=/usr/include/openssl/   EXTRACFLAGS=-fPIC

没有加  EXTRACFLAGS=-fPIC 在编译php-imap 报错: libc-client.a: could not read symbols: Bad value。加了后顺利编译通过


第二步,复制文件到目录

mkdir lib

mkdir include

cp c-client/*.c lib/

cp c-client/*.h include/

cp c-client/c-client.a lib/libc-client.a


第三部,编译PHP

用扩展的方式编译省时省力,

cd php-5.3.23/ext/imap

phpize

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

copy imap.la  imap.so 到 PHP 扩展目录


第四步,修改php配置

修改 php.ini 添加

extension=/path/to/imap.so

重启php-fpm


参考

http://www.brighterlamp.com/2012/12/how-to-compile-php-with-imap-support/

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template