Today I encountered the following error while recompiling php with imap support on a customer’s server (CentOS 6.4 – 64 bit): configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information. Unfortunately the config.log did not say much either, so I began searching on Google what this error is about and soon found out that it’s related to imap extension, so all I had to do was to download and recompile imap-2007e.tar.gz. Since this is a multi-php environment (using both php 5.4 and 5.3) this proved out to be a big hassle and a lot of dependencies were not met. Instead of trying to solve each issue one at a time, I decided to look for a smarter/faster solution so the first thing I did was to see what packages are related to imap and are also related to development
[[email protected] ~]# yum search all imap |grep -i dev cyrus-imapd-devel.i686 : Cyrus IMAP server development files cyrus-imapd-devel.x86_64 : Cyrus IMAP server development files libc-client-devel.i686 : Development tools for programs which will use the IMAP libc-client-devel.x86_64 : Development tools for programs which will use the libsieve-devel.i686 : A library for parsing, sorting and filtering your mail libsieve-devel.x86_64 : A library for parsing, sorting and filtering your mail
Since there weren’t so many packages to check I decided to see what’s in each with yum info and so I reached libc-client-devel:
[[email protected] ~]# yum info libc-client-devel.x86_64 Available Packages NameÂ Â Â Â Â Â Â : libc-client-devel ArchÂ Â Â Â Â Â Â : x86_64 VersionÂ Â Â Â : 2007e ReleaseÂ Â Â Â : 11.el6 SizeÂ Â Â Â Â Â Â : 56 k RepoÂ Â Â Â Â Â Â : base SummaryÂ Â Â Â : Development tools for programs which will use the IMAP library. URLÂ Â Â Â Â Â Â Â : http://www.washington.edu/imap/ LicenseÂ Â Â Â : ASL 2.0 Description : The c-client-devel package contains the header files and static libraries : for developing programs which will use the C-client common API.
Bingo! It seems to contain what was needed so I decided to install it
yum -y install libc-client-devel
After installation I was able to recompile php without issues. NOTE: Debian or deb based distribution users the package you need to install is libc-client2007e-devÂ
apt-get install libc-client-dev
2 thoughts on “How to fix error utf8_mime2text()”
Bingo! That did the trick! Stackoverflow proposed the weirdest possible alternatives, including commenting out the IMAP configuration options. Lots of thankyous!
Happy to hear you found the solution to utf8_mime2text() error here.