php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7670 PHP crashes when accessing IMAP mailbox
Submitted: 2000-11-06 23:07 UTC Modified: 2002-01-14 05:52 UTC
From: skarkkai at woods dot iki dot fi Assigned:
Status: Closed Package: IMAP related
PHP Version: 4.0.3pl1 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: skarkkai at woods dot iki dot fi
New email:
PHP Version: OS:

 

 [2000-11-06 23:07 UTC] skarkkai at woods dot iki dot fi
When Courier IMAPd crashes while being accessed by IMP using PHP's IMAP functions, that causes also the Apache process to crash. The last IMAP messages before the crash are

00000005 SEARCH ALL UNSEEN
* SEARCH 29 30 31 32 33 34 35
00000005 OK SEARCH done.
00000006 FETCH 29:35 (UID ENVELOPE BODY.PEEK[HEADER.FIELDS (Path Message-ID Newsgroups Followup-To References)] INTERNALDATE RFC822.SIZE FLAGS)

Stack trace is obviously quite useless, as it is:

#0  0x3a4c8d10 in ?? ()
#1  0xbf60b801 in ?? ()
#2  0xc8b604ff in ?? ()
#3  0x7e7fc391 in ?? ()
#4  0xc8b604ff in ?? ()
#5  0x7e710cf1 in ?? ()
#6  0xd029715b in ?? ()
#7  0xa1a1ee2f in ?? ()
#8  0x55e8be66 in ?? ()

This happens both with PHP 3.0.16 and 4.0.3pl1. Apache is 1.3.11. I compile PHP with

./configure --with-mysql=/usr --with-apxs=/usr/local/www/apache/bin/apxs --with-xml --enable-track-vars=yes --enable-bcmath=yes --enable-memory-limit=yes --with-imap --with-ldap --enable-sysvshm --enable-sysvsem --with-gdbm

I can easily reproduce the crash by putting an offending email message into a Maildir that Courier reads. Any other information I should provide?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-08 00:46 UTC] sniper@php.net
1. Use --enable-debug in your configure line to get valid backtrace.
2. Try latest snapshot from http://snaps.php.net (IIRC, this is fixed already)
3. Have you compiled libc-client.a from sources ? 
( http://www.php.net/manual/ref.imap.php )

--Jani
 [2000-11-08 18:39 UTC] skarkkai at woods dot iki dot fi
I recompiled PHP from today's snapshot 200011081445, which didn't make the bug go away. The stack trace is now:

#0  0x4038924c in zend_hash_index_update_or_next_insert (ht=0x806cb6f, h=135351912, pData=0xbffffba8, nDataSize=2514400684, pDest=0x806cc2f, flag=135155768) at zend_hash.c:433
#1  0xe5ec688e in ?? ()
[...]

My c-client is from imap-devel-4.6-3 rpm (I think, at least that package has the right headers).
 [2000-11-28 04:34 UTC] sniper@php.net
Assigning this..I have partial fix for this already
but it still needs some work.

--Jani
 [2001-12-16 16:29 UTC] sniper@php.net
Could you please check if this bug  still exists with PHP 4.1.0 and 
with the latest c-client? There have been many fixes in both.

 [2002-01-06 07:33 UTC] sander@php.net
No feedback. Closing.
 [2002-01-14 05:52 UTC] skarkkai at woods dot iki dot fi
Sorry for taking so long to answer. I just tested with PHP 4.1.1 and c-client 2001a, and at least the procedure that triggered the bug before did not cause a crash this time. IMP returns me to login screen when I abruptly close the IMAP connection, whereas before Apache crashed in that situation.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 07:01:31 2024 UTC