|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-11-02 14:20 UTC] sniper@php.net
[2005-11-10 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 22:00:02 2025 UTC |
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.