lineartube

Registered
Feb 7, 2005
2
0
151
Hi,

I'm a newbie, so please don't shoot me if I'm skipping something obvious. :confused:

I'm trying to update Apache with the IMAP module through the WHM and I keep getting an error.

I'm using:

WHM 10.8.0 cPanel 10.8.1-C112
RedHat 9 i686 - WHM X v3.1.0

and when I try an "Update Apache", I get this:

Untarring imap....Using RPM Backend: RPM version 4.2
installed: imap-devel-2004e-1.rh9.swsoft
Untarring php....Done
Applying CURL curl_formfree patch
patching file ext/curl/curl.c
Hunk #1 succeeded at 590 (offset 45 lines).
Hunk #2 succeeded at 904 (offset 19 lines).

configure php-4.4.1...(--with-apxs=/usr/local/apache/bin/apxs --prefix=/usr/local --with-xml --enable-bcmath --enable-calendar --with-curl --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --with-imap --with-imap-ssl --with-kerberos --enable-magic-quotes --with-mysql=/usr --enable-discard-path --with-pear --enable-sockets --enable-track-vars --enable-versioning --with-zlib).... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Done

configure: error: build test failed. Please check the config.log for details.


ok... I check the config.log and I get this:

configure:45309: checking whether IMAP works
configure:45342: gcc -o conftest -g -O2 -L/usr/X11R6/lib64 -Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib -Wl,-rpath,/usr/kerberos/lib -L/usr/ke$
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libc-client.a(osdep.o)(.text+0xbf07): In function `ssl_onceonlyinit':
: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libc-client.a(osdep.o)(.text+0x4ede): In function `write_db_entry':
: undefined reference to `__db185_open'
collect2: ld returned 1 exit status
configure: failed program was:
#line 45317 "configure"
#include "confdefs.h"

void mm_log(void){}
void mm_dlog(void){}
void mm_flags(void){}
void mm_fatal(void){}
void mm_critical(void){}
void mm_nocritical(void){}
void mm_notify(void){}
void mm_login(void){}
void mm_diskerror(void){}
void mm_status(void){}
void mm_lsub(void){}
void mm_list(void){}
void mm_exists(void){}
void mm_searched(void){}
void mm_expunged(void){}
char mail_newbody();
int main() {
mail_newbody();
return 0;
}


So... __db185_open is a reference to libdb which is probably missing or outdated?

How can I fix this?
 

visiox

Well-Known Member
Jan 19, 2004
49
0
156
Hi there,

after spending hours on trying to compile/update php with imap-module on an VPS Redhat Enterprise (64bit?) and reading the errormessage

configure: error: build test failed. Please check the config.log for details.

...and having no idea what to do... I tried the following...

SSH with root

cp /usr/local/cpanel/3rdparty/bin/imapd /usr/local/cpanel/3rdparty/bin/xxximapd
cp /usr/lib/c-client.a /usr/lib/xxxc-client.a
cd /root
mkdir test
cd test
wget ftp://ftp.cac.washington.edu/imap/imap-2004g.tar.Z
tar xzf imap-2004g.tar.Z
cd imap-2004g
make slx EXTRACFLAGS=-I/usr/kerberos/include
cp imapd/imapd /usr/local/cpanel/3rdparty/bin/imapd
cp c-client/c-client.a /usr/lib/c-client.a
(testing imap-access from @home -> not working)
starting WHM -> Software->Apache Update -> php with imap

configure php-4.4.2...(--with-apxs=/usr/local/apache/bin/apxs --prefix=/usr/local --with-xml --enable-bcmath --enable-calendar --with-curl --with-swf=/usr/local/flash --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --with-gettext --with-imap --with-imap-ssl --with-kerberos --with-mcrypt --with-mhash --enable-magic-quotes --with-mysql=/usr --with-openssl --enable-discard-path --with-pear --enable-xslt --with-xslt-sablot --enable-safe-mode --enable-sockets --enable-track-vars --with-ttf --with-freetype-dir=/usr --enable-gd-native-ttf --enable-versioning --with-xmlrpc --with-zlib).... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Done

make -j 4 php-4.4.2...(clean).... Done

make -j 4 php-4.4.2....... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Done

make php-4.4.2...(install).... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Done

/etc/rc.d/init.d/httpd start: httpd started

configure php-4.4.2...(--prefix=/usr --with-xml --enable-bcmath --enable-calendar --with-curl --with-swf=/usr/local/flash --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --with-gettext --with-imap --with-imap-ssl --with-kerberos --with-mcrypt --with-mhash --enable-magic-quotes --with-mysql=/usr --with-openssl --enable-discard-path --with-pear --enable-xslt --with-xslt-sablot --enable-safe-mode --enable-sockets --enable-track-vars --with-ttf --with-freetype-dir=/usr --enable-gd-native-ttf --enable-versioning --with-xmlrpc --with-zlib).... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Done

make -j 4 php-4.4.2...(clean).... Done

make -j 4 php-4.4.2....... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Done

make php-4.4.2...(install).... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Done

initfpsuexec: using apache 1.x support
PHP version file has been updated to
Executing /scripts/postbuildapache (if exists)...Done
/etc/rc.d/init.d/httpd start: httpd started
cp /usr/local/cpanel/3rdparty/bin/xxximapd /usr/local/cpanel/3rdparty/bin/imapd
cp /usr/lib/xxxc-client.a /usr/lib/c-client.a

now the test...

PHP:
$mbox = imap_open("{localhost:143}INBOX", "<username>", "<password>");
$sentok = imap_mail("[email protected]","Test-Mail","Test  Test", "Return-path: [email protected]\nFrom: [email protected]");
imap_close($mbox);
..guess what..... it's working now!

Regards,
VisioX
 
Last edited:

xWho

Well-Known Member
Apr 23, 2003
112
0
166
After using this fix, IMAP logins no longer work. For example, when trying to login to Squirrel Mail:

Bad request: The IMAP server is reporting that plain text logins are disabled. Using CRAM-MD5 or DIGEST-MD5 authentication instead may work. Also, the use of TLS may allow SquirrelMail to login. Please contact your system administrator and report this error.

How do I fix this?
 

xWho

Well-Known Member
Apr 23, 2003
112
0
166
After using this fix, IMAP logins no longer work. For example, when trying to login to Squirrel Mail:

Bad request: The IMAP server is reporting that plain text logins are disabled. Using CRAM-MD5 or DIGEST-MD5 authentication instead may work. Also, the use of TLS may allow SquirrelMail to login. Please contact your system administrator and report this error.

How do I fix this?
 

xWho

Well-Known Member
Apr 23, 2003
112
0
166
All webmail on my server is broken after using this "fix". Please help me "unfix" it. I went back to the previous Apache/PHP build and I am still receiving the error.
 

visiox

Well-Known Member
Jan 19, 2004
49
0
156
Hi there,

if you followed my "fix", you should have 2 files on your system called "/usr/local/cpanel/3rdparty/bin/xxximapd" and "/usr/lib/xxxc-client.a".

Copy them over the compiled ones ->
cp /usr/local/cpanel/3rdparty/bin/xxximapd /usr/local/cpanel/3rdparty/bin/imapd
cp /usr/lib/xxxc-client.a /usr/lib/c-client.a

Restart IMAP

Go ahead with the standard php installation

That should be your "downgrade"
 

xWho

Well-Known Member
Apr 23, 2003
112
0
166
THANK YOU!

That has fixed my IMAP problems. I have new errors popping up that I didn't have.

No mail will go through at all now, its all collecting in the queue, and when attempting to deliver any of them, here's the error:

== [email protected] R=virtual_user T=virtual_userdelivery defer (13): Permission denied: failed to create directories for /home/paulley/mail/webaddress.com/emailaddress: Permission denied

All the webmail interfaces give cannot create errors, too. Is this related or a separate issue?
 

WebScHoLaR

Well-Known Member
Dec 14, 2005
508
3
168
Planet Earth
visiox said:
Hi there,

after spending hours on trying to compile/update php with imap-module on an VPS Redhat Enterprise (64bit?) and reading the errormessage

configure: error: build test failed. Please check the config.log for details.

...and having no idea what to do... I tried the following...

SSH with root

cp /usr/local/cpanel/3rdparty/bin/imapd /usr/local/cpanel/3rdparty/bin/xxximapd
cp /usr/lib/c-client.a /usr/lib/xxxc-client.a
cd /root
mkdir test
cd test
wget ftp://ftp.cac.washington.edu/imap/imap-2004g.tar.Z
tar xzf imap-2004g.tar.Z
cd imap-2004g
make slx EXTRACFLAGS=-I/usr/kerberos/include
cp imapd/imapd /usr/local/cpanel/3rdparty/bin/imapd
cp c-client/c-client.a /usr/lib/c-client.a
(testing imap-access from @home -> not working)
starting WHM -> Software->Apache Update -> php with imap


cp /usr/local/cpanel/3rdparty/bin/xxximapd /usr/local/cpanel/3rdparty/bin/imapd
cp /usr/lib/xxxc-client.a /usr/lib/c-client.a

now the test...

PHP:
$mbox = imap_open("{localhost:143}INBOX", "<username>", "<password>");
$sentok = imap_mail("[email protected]","Test-Mail","Test  Test", "Return-path: [email protected]\nFrom: [email protected]");
imap_close($mbox);
..guess what..... it's working now!

Regards,
VisioX
Thanks alot :) ... Worked perfectly for me...
 

glassjos

Member
PartnerNOC
Jun 5, 2003
8
0
151
East Lansing
Disable versioning for IMAP 64bit CentOS

An easier fix is to disable Versioning support in php via easapache's PHP configuration.