still errors
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
*** There was an error while trying to configure php. Check the configure file
This is the error I get trying to use what you pointed me to.
Code:
[root@hq scripts]# sh ./setup-imap.sh
Downloading imap-2007f.tar.Z...
--2019-01-16 23:12:51-- ftp://ftp.cac.washington.edu/imap/old/imap-2007f.tar.Z
=> 'imap-2007f.tar.Z'
Resolving ftp.cac.washington.edu (ftp.cac.washington.edu)... failed: Name or service not known.
wget: unable to resolve host address 'ftp.cac.washington.edu'
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
./setup-imap.sh: line 31: cd: imap-2007f: No such file or directory
Installing imap-2007f...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Can't open src/osdep/unix/Makefile: No such file or directory.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Can't open src/osdep/unix/Makefile: No such file or directory.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Can't open src/osdep/unix/Makefile: No such file or directory.
make: *** No rule to make target `slx'. Stop.
Copying files to /usr/local/php-imap
cp: cannot stat 'c-client/*.h': No such file or directory
cp: cannot stat 'c-client/*.c': No such file or directory
cp: cannot stat 'c-client/c-client.a': No such file or directory
[root@hq scripts]#
The urls was wrong so I found a new url, so I change the script and here's the new one.
Code:
#!/bin/sh
# Script for PHP-IMAP installation. 0.1b
# 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="https://www.mirrorservice.org/sites/ftp.cac.washington.edu/imap/imap-${VERSION}.tar.Z"
FILENAME=imap-${VERSION}
TARBALL=${FILENAME}.tar.Z
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;
The added this to configure.php* located at /usr/local/directadmin/custombuild/configure/fpm you need to add this to all the php v files that you want to enable php-imap.
--with-imap=/usr/local/php-imap \
--with-imap-ssl \
After that you need to rebuild you php
go to /usr/local/directadmin/custombuild
Execute command
./build php n
Then I get this error:
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
*** There was an error while trying to configure php. Check the configure file
I did change tis
--with-imap=/usr/local/php-imap \
--with-imap-ssl \
To this
--with-imap= \
--with-imap-ssl \
Still get the same error.
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
*** There was an error while trying to configure php. Check the configure file
Here is my configure.php*
This is php 7.0
Code:
#!/bin/sh
./configure \
--prefix=/usr/local/php70 \
--program-suffix=70 \
--enable-fpm \
--with-fpm-systemd \
--with-config-file-scan-dir=/usr/local/php70/lib/php.conf.d \
--with-curl \
--with-gd \
--enable-gd-native-ttf \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-freetype-dir=/usr/local/lib \
--with-libxml-dir=/usr/local/lib \
--with-kerberos \
--with-openssl \
--with-mcrypt \
--with-mhash \
--with-mysql-sock=/var/lib/mysql/mysql.sock \
--with-mysqli=mysqlnd \
--with-pcre-regex=/usr/local \
--with-pdo-mysql=mysqlnd \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-xsl \
--with-zlib \
--enable-zip \
--with-iconv=/usr/local \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-sockets \
--enable-soap \
--enable-mbstring \
--with-xmlrpc \
--with-imap= \
--with-imap-ssl \
--with-icu-dir=/usr/local/icu \
--enable-intl
This is php 7.1
Code:
#!/bin/sh
./configure \
--prefix=/usr/local/php71 \
--program-suffix=71 \
--enable-fpm \
--with-config-file-scan-dir=/usr/local/php71/lib/php.conf.d \
--with-curl \
--with-gd \
--enable-gd-native-ttf \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-freetype-dir=/usr/local/lib \
--with-libxml-dir=/usr/local/lib \
--with-kerberos \
--with-openssl \
--with-mcrypt \
--with-mhash \
--with-mysql-sock=/var/lib/mysql/mysql.sock \
--with-mysqli=mysqlnd \
--with-pcre-regex=/usr/local \
--with-pdo-mysql=mysqlnd \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-xsl \
--with-zlib \
--enable-zip \
--with-iconv=/usr/local \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-sockets \
--enable-soap \
--enable-mbstring \
--with-xmlrpc \
--with-imap= \
--with-imap-ssl \
--with-icu-dir=/usr/local/icu \
--with-icu-dir=/usr/local/icu \
--enable-intl
This is php 7.2
Code:
#!/bin/sh
./configure \
--prefix=/usr/local/php72 \
--program-suffix=72 \
--enable-fpm \
--with-fpm-systemd \
--with-config-file-scan-dir=/usr/local/php72/lib/php.conf.d \
--with-curl \
--with-gd \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-freetype-dir=/usr/local/lib \
--with-libxml-dir=/usr/local/lib \
--with-kerberos \
--with-openssl \
--with-mhash \
--with-mysql-sock=/var/lib/mysql/mysql.sock \
--with-mysqli=mysqlnd \
--with-pcre-regex=/usr/local \
--with-pdo-mysql=mysqlnd \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-sodium=/usr/local \
--with-xsl \
--with-zlib \
--enable-zip \
--with-iconv=/usr/local \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-sockets \
--enable-soap \
--enable-mbstring \
--with-xmlrpc \
--with-imap= \
--with-imap-ssl \
--with-icu-dir=/usr/local/icu \
--enable-intl
This is php 7.3
Code:
#!/bin/sh
./configure \
--prefix=/usr/local/php73 \
--program-suffix=73 \
--enable-fpm \
--with-config-file-scan-dir=/usr/local/php73/lib/php.conf.d \
--with-curl \
--with-gd \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-freetype-dir=/usr/local/lib \
--with-libxml-dir=/usr/local/lib \
--with-kerberos \
--with-openssl \
--with-mhash \
--with-mysql-sock=/var/lib/mysql/mysql.sock \
--with-mysqli=mysqlnd \
--with-pcre-regex=/usr/local \
--with-pdo-mysql=mysqlnd \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-sodium=/usr/local \
--with-xsl \
--with-zlib \
--enable-zip \
--without-libzip \
--with-iconv=/usr/local \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-sockets \
--enable-soap \
--enable-mbstring \
--with-xmlrpc \
--with-imap= \
--with-imap-ssl \
--with-icu-dir=/usr/local/icu \
--with-icu-dir=/usr/local/icu \
--enable-intl
Then I installed yum install libc-client-devel
Same still getting error.
Thanks