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.


aptitude install libc-client-dev


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.

4 thoughts to “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…

    1. Hi there!
      I found a page that describes how you can fix the problem you’re having with the libc-client.a file.

      I can’t test it myself, since i don’t have a CentOS install available here for me right now. Please let me know if it helped fixing your problem.

  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.

  3. Thanks for that.
    For me, using OpenLiteSpeed Server and PHP 5.6.31 on Ubuntu 16.04 I needed:
    apt-get install libc-client-dev libkrb5-dev

    –with-kerberos –with-imap –with-imap-ssl

    I already had building with SSL working.

Leave a Reply

Your email address will not be published.