imap 怎么开启

问答中心分类: PHPimap 怎么开启
匿名用户 asked 8 年 ago
有些程序需要开启imap
 
PHP IMAP extension is disabled

4 Answers
oneinstack answered 8 年 ago
一键安装包 装好后少imap如何操作
yum install libc-client-devel.x86_64
ln -s /usr/lib64/libc-client.so /usr/lib/libc-client.so
cd oneinstack/src
tar xzf php-${php56_version}.tar.gz  #具体看你的版本号
cd php-${php56_version}/ext/imap
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-kerberos --with-imap --with-imap-ssl 
make && make install
cd /usr/local/php/lib/php/extensions
cd no-debug-non-zts-20131226
ls #查看有没有 imap.so
添加配置文件
echo 'extension = "imap.so"' > /usr/local/php/etc/php.d/ext-imap.ini
重启启动
service php-fpm restart

Eric answered 8 年 ago
第一行指令,找不到档案我是用
yum install libc-client-devel
。。。
make
make install
。。。。
 

laoshh answered 6 年 ago
我的版本是php-5.6.34.tar.gz
环境是:
Aliyun centos7.4
Apache 2.4
mysql 5.7
PHP 7.1.15
Package uw-imap-devel-2007f-16.el7.x86_64 already installed and latest version
在make && make install这步出错:
/usr/local/src/oneinstack/src/php-5.6.34/ext/imap/php_imap.c:43:40: fatal error: ext/standard/php_smart_str.h: No such file or directory
#include "ext/standard/php_smart_str.h"
^
compilation terminated.
make: *** [php_imap.lo] Error 1

laoshh answered 6 年 ago

问题已经解决了
IMAP配置成功!

tar xzf php-${php56_version}.tar.gz  #具体看你的版本号中的“56”引起误会
因为的的版本是PHP7.1.15,所以正确的是用tar xzf php-7.1.15.tar.gz
cd /usr/local/php/lib/php/extensions
cd no-debug-non-zts-20131226 这里也要看当前的版本
在这个例子中是cd no-debug-non-zts-20160303
其他的OK,谢谢!