#35011 [NEW]: imap calls hang
| From: | ckryzan at prosidio dot com | Date: | Sat, 29 Oct 2005 00:18:08 +0000 |
| Subject: | #35011 [NEW]: imap calls hang | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-87192@lists.php.net to get a copy of this message | ||
From: ckryzan at prosidio dot com
Operating system: Linux
PHP version: 4.4.0
PHP Bug Type: Mail related
Bug description: imap calls hang
Description:
------------
I am having a very similar issue, and it is very
reproduceable. The imap_fetchstructure(), imap_headers() and
imap_headerinfo() calls all fail -- without returning any
value whatsoever -- for what I have narrowed down to the
following condition: When the attachment file size is big
(>1MB it seems), these calls hang without returning. It is
very reproduceable, and I did a rather comprehensive set of
tests to determine what was triggering these calls to hang,
and this seems to be the culprit.
Reproduce code:
---------------
// Open an IMAP stream using the email configuration data
$mailbox =
imap_open("{".$this->data['server']."}INBOX",$this->data['user'],$this->data['password']);
if (!$mailbox) return false; // If the stream is unable to be opened,
return false
// Extract content from messages
for ($i=1; $i<=imap_num_msg($mailbox); $i++) { // Iterate through all of
the headers
// Retrieve the message overview
$header = imap_headerinfo($mailbox,$i); // Retrieve an overview of the
information contained in the message
print_r($header);
// Retrieve the message structure
$structure = imap_fetchstructure($mailbox,$i); // Retrieve the structure
of the message
print_r($structure);
}
Expected result:
----------------
I would expect the header and structure to be printed for each
message in the mailbox. This does, in fact, happen, until it
encounters a message with an attachment that is relatively big
(>1MB more or less). At that point, I would expect it to
continue. Instead, the functions (pick any one of the three I
mention) simply hang, without returning any value. This is
connecting to a POP3 server. I can easily download the
messages to my desktop email client, repeatedly, by the way.
--
Edit bug report at http://bugs.php.net/?id=35011&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35011&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35011&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35011&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35011&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35011&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35011&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35011&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35011&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35011&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35011&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35011&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35011&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35011&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35011&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35011&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35011&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35011&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35011&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35011&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35011&r=mysqlcfg