#24716 [NEW]: imap_fetchstructure() hangs on certain messages
From: akropel1 at rochester dot rr dot com
Operating system: OpenBSD-3.0
PHP version: 4.3.3RC1
PHP Bug Type: IMAP related
Bug description: imap_fetchstructure() hangs on certain messages
Description:
------------
Calling imap_fetchstructure() on certain multi-part messages causes an
indefinite hang (function never returns) and the script eventually times
out. I've been running a database import of an old mail archive and out of
about 172,000 messages, 2 seem to induce this hang. Other imap_* functions
seem to work fine, including imap_fetchheader() and imap_headerinfo().
The full messages can be found here:
http://www.kroptech.com/~adk0212/failedmsg.1
http://www.kroptech.com/~adk0212/failedmsg.2
Versions:
c-client from imap-2002d
apache_1.3.27
PHP Config:
./configure --with-apache=/home/adk0212/downloads/apache_1.3.27
--with-sysvsem --with-sysvshm --with-pgsql --with-mysql
--with-imap=/home/adk0212/imap-2002d --with-mcrypt --with-gettext
--with-xml --with-curl
Reproduce code:
---------------
<?php
$pop_user = "someuser";
$pop_pass = "somepassword";
$pop_host = "somehost.somewhere.com";
$mbox_path = "/path/to/failedmsg.1";
$pop_conn_string = "\{$pop_host:143/imap}$mbox_path";
$pop_conn = imap_open($pop_conn_string, $pop_user, $pop_pass);
// Assuming message-of-death is first one in the mbox
$mimeobj = imap_fetchstructure($pop_conn, 1);
// Never gets here...
imap_close($pop_conn);
?>
Expected result:
----------------
imap_fetchstructure() should quickly return the structure of the message.
Actual result:
--------------
Indefinitely hang. imap_fetchstructure() never returns.
--
Edit bug report at http://bugs.php.net/?id=24716&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24716&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24716&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=24716&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=24716&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24716&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=24716&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=24716&r=support
Expected behavior: http://bugs.php.net/fix.php?id=24716&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=24716&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=24716&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=24716&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24716&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=24716&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=24716&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=24716&r=gnused
Thread (7 messages)
- akropel1 at rochester dot rr dot com