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/