PHP5 with IMAP and SSL support

Building your own PHP with IMAP support is not that hard, but i noticed a lot of people tend to have problems when they want SSL support in it.

You might run into stuff like this (when reconfiguring php f.e.):

configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.

First things first, .. forget all the posts and manuals you read about downloading imap-2007e.tar.gz and what not and just do the following.

Debian:

aptitude install libc-client-dev

Fedora:

yum install libc-client-devel

Then run your php configure again with:

./config.nice --with-imap --with-imap-ssl --with-kerberos

Then continue installing php like you always do.

3 thoughts on “PHP5 with IMAP and SSL support

  1. tried on centos:

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

    anyway. so…

  2. I realise this an old post, however it came up early in my google searching so I thought I’d add some notes on what I had to do to get PHP 5.4.23 to compile on Ubuntu 12.04 AMD64 with IMAP support.

    In addition to the libc-client-dev package I also had to install libssl-dev and libkrb5-dev. Also, because I’m compiling on a 64 bit system, there are some issues with the libraries being found. To get around this I did the following:

    Create the directory /usr/lib64
    Create a symbolic link from /usr/lib/libc-client.a to /usr/lib64/libc-client.a
    Create a symbolic link from /usr/lib/x86_64-linux-gnu/libssl.a to /usr/lib64/libssl.a

    For the configure step I then used ./configure –with-libdir=lib64 –with-openssl=/usr –with-kerberos –with-imap=/usr –with-imap-ssl

    I hope that helps someone.

Leave a Reply

Your email address will not be published.

*