I need IMAP compiled into php

factor

Verified User
Joined
Jul 22, 2017
Messages
3,754
Location
USA
All:

I have read all of the posts I could find. I have run through this at least 6 time.

Can someone please tell me what process I need to follow.

I did this.
https://help.directadmin.com/item.php?id=341

This guide is it current? I have centos7, custombuild 2, the most current stable version of directadmin, and php 56 and 71 with fpm. It doesn't work for me.
 
Solved

All:

I have read all of the posts I could find. I have run through this at least 6 time.

Can someone please tell me what process I need to follow.

I did this.
https://help.directadmin.com/item.php?id=341

This guide is it current? I have centos7, custombuild 2, the most current stable version of directadmin, and php 56 and 71 with fpm. It doesn't work for me.

Ok I figured it out. Used mostly this http://forum.directadmin.com/showthread.php?t=45434&p=232384#post232384
The script needs updating changed info.
Code:
#!/bin/sh
# Script for PHP-IMAP installation. 0.1b
# Updated by Brent Dacus 2017 ver 0.1c
# Changed version and link provide by DA
# Written by Martynas Bendorius (smtalk)

CWD=`pwd`
OS=`uname`

#Is it a 64-bit OS?
B64=0

B64COUNT=`uname -m | grep -c 64`
if [ "$B64COUNT" -eq 1 ]; then
    B64=1
    LD_LIBRARY_PATH=/lib64:/usr/lib64:/usr/local/lib64:/lib:/usr/lib:/usr/local/lib
    export LD_LIBRARY_PATH
fi

if [ ! -e /usr/include/krb5.h ] && [ -e /etc/redhat-release ]; then
    echo "Installing krb5-devel"
    yum -y install krb5-devel
fi

VERSION=2007f
URL="http://files.directadmin.com/services/all/imap/imap-${VERSION}.tar.gz"
FILENAME=imap-${VERSION}
TARBALL=${FILENAME}.tar.gz

echo "Downloading ${TARBALL}..."
wget -O ${TARBALL} ${URL}
tar xzf ${TARBALL}
cd ${FILENAME}

echo "Installing ${FILENAME}..."

if [ ${OS} = "FreeBSD" ]; then
    if [ ${B64} -eq 0 ]; then
        make bsf
    else
        make bsf EXTRACFLAGS=-fPIC
    fi
else
    perl -pi -e 's#SSLDIR=/usr/local/ssl#SSLDIR=/etc/pki/tls#' src/osdep/unix/Makefile
    perl -pi -e 's#SSLINCLUDE=\$\(SSLDIR\)/include#SSLINCLUDE=/usr/include/openssl#' src/osdep/unix/Makefile
    perl -pi -e 's#SSLLIB=\$\(SSLDIR\)/lib#SSLLIB=/usr/lib/openssl#' src/osdep/unix/Makefile
    if [ ${B64} -eq 0 ]; then
        make slx
    else
        make slx EXTRACFLAGS=-fPIC
    fi
fi

echo "Copying files to /usr/local/php-imap"
mkdir -p /usr/local/php-imap/include
mkdir -p /usr/local/php-imap/lib
chmod -R 077 /usr/local/php-imap
cp -f c-client/*.h /usr/local/php-imap/include/
cp -f c-client/*.c /usr/local/php-imap/lib/
cp -f c-client/c-client.a /usr/local/php-imap/lib/libc-client.a
cd ..
rm -rf ${FILENAME}

if [ -d /usr/lib/x86_64-linux-gnu ] && [ ! -d /usr/kerberos/lib ]; then
    mkdir -p /usr/kerberos
    ln -s /usr/lib/x86_64-linux-gnu /usr/kerberos/lib
fi


exit 0;

then added to both configure file for 56 and 71

Code:
--with-imap=/usr/local/php-imap \
--with-imap-ssl \

then
Code:
./build php d
 
supports both CustomBuild 1.x and 2.x.
For CB2, it will automatically detect the configure.phpX path.
 
Back
Top