php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15472 Imap_open crashes php
Submitted: 2002-02-09 16:37 UTC Modified: 2002-06-17 20:24 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: dkmaster at quebeber dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 4.1.1 OS: Linux Debian SID
Private report: No CVE-ID: None
 [2002-02-09 16:37 UTC] dkmaster at quebeber dot com
Hi.
Today i was installing horde into my computer, when i noticed that php crashes when login into "IMP".

I have installed Courier Imap server, and the latest modules from debian unestable branch.

The code that crashes all is:

echo imap_open ("{localhost:143/imap}INBOX", "user_id", "password"), "\n";

Thanks

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-09 16:52 UTC] sander@php.net
To properly diagnose this bug, we need a backtrace to see what is
happening behind the scenes. To find out how to generate a backtrace,
please read http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open".
 [2002-02-09 16:54 UTC] sander@php.net
A configure line wouldn't hurt either...
 [2002-02-09 17:00 UTC] dkmaster at quebeber dot com
The problem seems to be when courier sais this capabilites string:
IMAP_CAPABILITY="IMAP4rev1 CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT AUTH=CRAM-MD5"
If AUTH=CRAM-MD5 is removed, all seems to be fine (no more segmentation faults ;)

 [2002-02-09 17:02 UTC] sander@php.net
Can you please provide your configure-line and a backtrace?
 [2002-02-09 17:06 UTC] dkmaster at quebeber dot com
By the way, i don't know if the problem is that my courier instalation doesn't support CRAM-MD5 auth, due to the fact that it is authenticating agains LDAP, and LDAP userPassword is already encripted.

Perhaps that's the problem.

Anyway, it should be interesting imap does accept that "buggy" imap server configuration. :)
 [2002-02-09 17:09 UTC] dkmaster at quebeber dot com
The configuration line is generated by debian automatically when i do "apt-get php4 --build". It regenerates all debian packages from files... i'm goin to do this again, capture the output config used and send it, ok?
 [2002-02-09 17:10 UTC] dkmaster at quebeber dot com
sorry, i mean "apt-get source php4 --build" :)
 [2002-02-09 17:17 UTC] dkmaster at quebeber dot com
Here is the backtrace:

#0  0x401c4743 in strnlen () from /lib/libc.so.6
#1  0x4019d0fe in vfprintf () from /lib/libc.so.6
#2  0x401b4253 in vsprintf () from /lib/libc.so.6
#3  0x401a460d in sprintf () from /lib/libc.so.6
#4  0x404c5809 in auth_md5_client () from /usr/lib/php4/20010901/imap.so
#5  0x404db226 in imap_auth () from /usr/lib/php4/20010901/imap.so
#6  0x404da8eb in imap_open () from /usr/lib/php4/20010901/imap.so
#7  0x404b9b9a in mail_open () from /usr/lib/php4/20010901/imap.so
#8  0x404aa397 in zm_info_imap () from /usr/lib/php4/20010901/imap.so
#9  0x404aa449 in zif_imap_open () from /usr/lib/php4/20010901/imap.so
#10 0x08103acf in execute ()
#11 0x080e647a in zend_execute_scripts ()
#12 0x0806355d in php_execute_script ()
#13 0x080616ac in main ()
#14 0x4016a6cf in __libc_start_main () from /lib/libc.so.6


I'm working on config line, but i think it doesn't matter, if server says it has MD5, and later don't support it, i think it will crash... :)
 [2002-02-09 17:18 UTC] dkmaster at quebeber dot com
./configure --prefix=/usr --with-apxs=/usr/bin/apxs --with-regex=system \
        --with-config-file-path=/etc/php4/apache --disable-rpath \
        --disable-debug --enable-memory-limit --enable-calendar --enable-sysvsem --enable-sysvshm --enable-
track-vars --enable-trans-sid --enable-bcmath --with-bz2 --enable-ctype --with-db2 --with-iconv --with-ndbm
 --enable-exif --enable-filepro --enable-ftp --with-gettext --enable-mbstring --with-pcre-regex=/usr --enab
le-shmop --enable-sockets --enable-wddx --with-xml=/usr --with-expat-dir=/usr --enable-yp --with-zlib --wit
hout-pgsql --disable-static \
        --with-layout=GNU \
        --with-curl=shared,/usr \
        --with-dom=shared,/usr --with-zlib-dir=/usr \
        --with-gd=shared,/usr \
        --with-jpeg-dir=shared,/usr --with-xpm-dir=shared,/usr/X11R6 --with-png-dir=shared,/usr \
                --with-freetype-dir=shared,/usr  \
        --with-imap=shared,/usr \
        --with-ldap=shared,/usr \
        --with-mcal=shared,/usr \
        --with-mhash=shared,/usr \
        --with-mm \
        --with-mysql=shared,/usr \
        --with-recode=shared,/usr \
        --enable-xslt \
        --with-xslt-sablot=shared,/usr \
        --with-snmp=shared \
        --enable-ucd-snmp-hack \
        --with-sybase-ct=shared,/usr \
        --with-ttf=shared,/usr --with-t1lib=shared,/usr
 [2002-02-13 10:27 UTC] eriksson@php.net
The crash is inside the IMAP library (imap_open, imap_auth, etc), according to the stack trace.
 [2002-06-17 20:24 UTC] sniper@php.net
This is not PHP problem but a problem with IMAP c-client
which uses such symbol names which might or might not exist
in other badly coded libraries which do not prefix their
symbols properly. These are recode, imap and some mysql libs. Feel free to report this to those people responsible
for these above mentioned software.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 11:01:34 2024 UTC