error: utf8_mime2text() has new signature - PHP Compilation error





Error:

error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.


Solution:

If you get the above error message when trying to compile php with imap module, you need to install the imap-2007f package first. You can use the following script to install imap-2007f package.
Once you installed imap using the following script, you can compile php with imap by using the following options.

--with-imap=/usr/local/src/imap-2007f --with-imap-ssl

***If you are using php5.1 or earlier versions, you have to use, the following package
ftp://ftp.cac.washington.edu/imap/old/imap-2004g.tar.Z

Copy the following script in imap-php.sh file, then

[root@vps [~]# chmod +x imap-php.sh

[root@vps [~]# sh imap-php.sh

======================================================================================================

#!/bin/sh

CWD=`pwd`
OS=`uname`

#To check if it is 64bit or not.
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


URL="wget ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz"
FILENAME=imap-2007f
TARBALL=${FILENAME}.tar.gz

cd /usr/local/src
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
sed -i  's/SSLDIR=\/usr\/local\/ssl/SSLDIR=\/etc\/pki\/tls/g' src/osdep/unix/Makefile
sed -i 's/SSLINCLUDE=$(SSLDIR)\/include/SSLINCLUDE=\/usr\/include\/openssl/g' src/osdep/unix/Makefile
sed -i 's/SSLLIB=$(SSLDIR)\/lib/SSLLIB=\/usr\/lib\/openssl/g' src/osdep/unix/Makefile

if [ ${B64} -eq 0 ]; then
make slx
else
make slx EXTRACFLAGS=-fPIC
fi
fi


mkdir include lib
chmod -R 077 ./
cp -f c-client/*.h include/
cp -f c-client/*.c lib/
cp -f c-client/c-client.a lib/libc-client.a

echo -e "\n\n\nUse the following options to compile php to enable imap.."
echo " --with-imap=/usr/local/src/imap-2007f --with-imap-ssl"

exit 0;
==========================================================================================

Hope this script helped you to install imap. If you have any problems with this script let me know. Thank you.

This entry was posted in by Unknown. Bookmark the permalink.

Leave a Reply