Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Can´t make IMAP to work with PHP

Discussion in 'General Discussion' started by lineartube, Feb 20, 2006.

  1. lineartube

    lineartube Registered

    Joined:
    Feb 7, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    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?
     
  2. visiox

    visiox Well-Known Member

    Joined:
    Jan 19, 2004
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    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

    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("xxx@somewhere.us","Test-Mail","Test  Test""Return-path: yyy@sendet-from.com\nFrom: yyy@sendet-from.com");
    imap_close($mbox);
    ..guess what..... it's working now!

    Regards,
    VisioX
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #2 visiox, Feb 20, 2006
    Last edited: Feb 21, 2006
  3. lineartube

    lineartube Registered

    Joined:
    Feb 7, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    151
    It worked!! Thanks!!
     
    #3 lineartube, Feb 21, 2006
    Last edited: Feb 22, 2006
  4. xWho

    xWho Well-Known Member

    Joined:
    Apr 23, 2003
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    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?
     
  5. visiox

    visiox Well-Known Member

    Joined:
    Jan 19, 2004
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    156
    Hmm...

    on my server the IMAP-Login is working. I tested several accounts.
    No problems.

    VisioX
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. xWho

    xWho Well-Known Member

    Joined:
    Apr 23, 2003
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    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?
     
  7. xWho

    xWho Well-Known Member

    Joined:
    Apr 23, 2003
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    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.
     
  8. visiox

    visiox Well-Known Member

    Joined:
    Jan 19, 2004
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    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"
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. xWho

    xWho Well-Known Member

    Joined:
    Apr 23, 2003
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    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:

    == emailaddress@webaddress.com 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?
     
  10. visiox

    visiox Well-Known Member

    Joined:
    Jan 19, 2004
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    156
    Hi there,

    looks like a problem with exim.

    Try following

    1) Check in WHM -> Server Configuration -> Tweak Settings -> The maximum each domain can send out per hour (0 is unlimited):
    2) Check for double account name, maybe there is one with a capital letter
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. WebScHoLaR

    WebScHoLaR Well-Known Member

    Joined:
    Dec 14, 2005
    Messages:
    511
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    Planet Earth
    Thanks alot :) ... Worked perfectly for me...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. glassjos

    glassjos Member
    PartnerNOC

    Joined:
    Jun 5, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    151
    Location:
    East Lansing
    Disable versioning for IMAP 64bit CentOS

    An easier fix is to disable Versioning support in php via easapache's PHP configuration.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice