CentOS6php imap compilation module

Source: Internet
Author: User
Tags imap
CentOS6php compile imap module php compile c-client imap client. http://www.washington.edu/imap/mirrors.html

Step 1: compile the c-client

In the end, the official documentation is a bit Pitfall. the compilation error "Error: x509v3. h: no file or directory" is reported. I searched the forum and compiled it using the following command.

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

Error: libc-client.a: cocould not read symbols: Bad value when compiling php-imap without adding EXTRACFLAGS =-fPIC. Compiled successfully


Step 2: copy the file to the Directory

Mkdir lib

Mkdir include

Cp c-client/*. c lib/

Cp c-client/*. h include/

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


Part 3: compile PHP

Compilation in extended mode saves time and effort,

Cd php-5.3.23/ext/imap

Phpize

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

Copy imap. la imap. so to PHP extension directory


Step 4: modify the php configuration

Modify php. ini to add

Extension =/path/to/imap. so

Restart php-fpm


Reference

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.