php如何开启imap服务,php开启imap,zip,curl支持

imap:

yum  install openssl-devel

yum install pam-devel

yum install libc-client libc-client-devel

yum install libcurl*

wget

tar zxf imap.tar.Z

cd imap-2007f

make lr5 PASSWDTYPE=std SSLTYPE=unix.nopwd IP6=4

mkdir /usr/local/imap-2007f

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

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

chmod -R 077 /usr/local/imap-2007f

cp imapd/imapd /usr/sbin/

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

重新编译php

'--with-imap-ssl'

\

'--with-imap=/usr/local/imap-2007f'

\

'--enable-zip'

\

'--with-curl'

\

64位:

在imap安装包下面编辑Makefile

找到

EXTRACFLAGS=

改为:

EXTRACFLAGS=-I/usr/kerberos/include

-L/usr/kerberos/lib -fPIC

make lr5 PASSWDTYPE=std SSLTYPE=unix.nopwd IP6=4

mkdir /usr/local/imap-2007f

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

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

chmod -R 077 /usr/local/imap-2007f

cp imapd/imapd /usr/sbin/

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

在php的config.nice加入--with-kerberos

就可以继续编译php支持imap模块了

原文:

PHP + IMAP on 64Bit machines

Given

the time I have spend solving this problem and all posts I have seen from

people with similar problems, still unsolved, I figured a small post on this

here might be appreciated.

The

two typical errors:

1.

configure: error: Cannot find imap library (libc-client.a). Please check your

IMAP installation.

2.

Check the path given to --with-kerberos (if no path is given, searches in

/usr/kerberos, /usr/local and /usr )

The

problem seems to be caused by mixture of 32bit and 64bit static code, with

which the linker has trouble relocating.

So,

how can you fix this? Use PIC-code:

1.

Make sure kereberos is installed: yum install krb5 krb5-devel

2.

Install the libc-client. This must be the one from DA, as it contains small

modifications for virtual accounts (as I read on this forum).

Code:

cd /usr/local/directadmin/customapache

wgettar -zxvf da_imap-2004g.tar.gz

cd imap-2004g

Modify

the Makefile for the libc-client to use PIC-code:

Find

these lines:

#EXTRACFLAGS=

DA CHANGED

EXTRACFLAGS=-I/usr/kerberos/include

-L/usr/kerberos/lib

And

change them to (only added option -fPIC):

#EXTRACFLAGS=

DA CHANGED

EXTRACFLAGS=-I/usr/kerberos/include

-L/usr/kerberos/lib -fPIC

Code:

./buildit

cd c-client

mkdir /usr/local/imap-2004g/

mkdir /usr/local/imap-2004g/lib

mkdir /usr/local/imap-2004g/include

cp *.h /usr/local/imap-2004g/include

cp *.c /usr/local/imap-2004g/lib

cp c-client.a /usr/local/imap-2004g/lib

mv /usr/local/imap-2004g/lib/c-client.a /usr/local/imap-2004g/lib/libc-client.a

3.

Modify the configure.php (or configure.php_ap2 for Apache2) file:

cd

/usr/local/directadmin/customapache

vi

configure.php

Remove

option: --with-kerberos

Add

options:

--enable-pic

\

--with-libdir=lib64

\

--with-imap=/usr/local/imap-2000e

4.

Compile PHP:

./build

clean

./build

php_ap2 n (for Apache2, for Apache1 use: ./build php n)

Now

you should end up with a working PHP+IMAP. Just need to restart Apache to load

the new version:

/sbin/service

httpd restart (or restart from DA)

源文档 <>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值