How do I enable PHP Imap support on Directadmin? Print

  • 148

We'll show you how to enable PHP-imap support for PHP 5 in Directadmin:

1) Make sure you have pam-devel and rpm-build installed:

# yum -y install pam-devel rpm-build

2) Get the imap-file to rebuild

# cd /root
# wget 

3) Build the packages

# rpmbuild --rebuild uw-imap-2007e-8.src.rpm

4) Enter the directory to install the files

# cd /root/rpmbuild/RPMS/x86_64/
# rpm -ivh uw-imap-static-2007e-8.el6.x86_64.rpm uw-imap-devel-2007e-8.el6.x86_64.rpm libc-client-2007e-8.el6.x86_64.rpm

5) Edit the directadmin custombuild config file

 # nano -w /usr/local/directadmin/custombuild/configure/ap2/configure.php5

add these entries:

--with-imap \
--with-imap-ssl \

6) Recompile PHP via Directadmin custombuild

# cd /usr/local/directadmin/custombuild
# ./build php n

6a) If you get an error message: "configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation."

Create a symbolic link to fix it:

# ln -s /usr/lib64/libc-client.a /usr/lib/libc-client.a

Then recompile PHP again:

# ./build php n 

That's it, PHP is now compiled with IMAP support! You can verify it via:

# php -m

Was this answer helpful?

« Back