#35011 [Opn->Fbk]: imap calls hang
| From: | sniper@php.net | Date: | Wed, 02 Nov 2005 13:20:19 +0000 |
| Subject: | #35011 [Opn->Fbk]: imap calls hang | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-87405@lists.php.net to get a copy of this message | ||
ID: 35011
Updated by: sniper@php.net
Reported By: ckryzan at prosidio dot com
-Status: Open
+Status: Feedback
Bug Type: IMAP related
Operating System: Linux
PHP Version: 4.4.0
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2005-10-29 02:18:07] ckryzan at prosidio dot com
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 this bug report at http://bugs.php.net/?id=35011&edit=1