How do I enable PHP Imap support on Directadmin?

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 http://dl.atrpms.net/src/el6-i386/atrpms/stable/uw-imap-2007e-8.src.rpm 

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
  • 59 utilizatori au considerat informaţia utilă
Răspunsul a fost util?

Articole similare

How to change username in Directadmin?

You can change the username of your directadmin clients at any time.This can be done via the...

What ports do I need to open in my firewall for Directadmin?

If you install a firewall in Directadmin it is recommended on opening the following default...

How do I compile wget for my server?

Sometimes the precompiled wget binaries refuse to work with your ssl linked libraries. The simple...