#18791 [Opn]: imap_fetch_overview fails to fetch all headers

From: Date: Wed, 07 Aug 2002 19:56:29 +0000
Subject: #18791 [Opn]: imap_fetch_overview fails to fetch all headers
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-16214@lists.php.net to get a copy of this message
ID: 18791 User updated by: jacooper@isr.umd.edu -Summary: imap_fetch_header fails to fetch all headers Reported By: jacooper@isr.umd.edu Status: Open Bug Type: IMAP related Operating System: Solaris 2.6 PHP Version: 4.2.2 New Comment: ack, botched the summary when I submitted. My apologies. -Jason Previous Comments: ------------------------------------------------------------------------ [2002-08-07 14:13:14] jacooper@isr.umd.edu PHP built with: './configure' '--with-apxs=/export/software/httpd/bin/apxs' '--with-ldap=/dept/isr/local' '--with-snmp=/dept/isr/local' '--with-imap=/dept/isr/local' '--with-mysql' '--with-gd=/usr/local' '--disable-safe-mode' '--prefix=/dept/isr/local' '--with-config-file-path=/export/software/httpd/conf' '--enable-cli' '--with-openssl=/dept/isr/local' '--with-imap-ssl=/dept/isr/local' according to phpinfo. c-client version is 2002-RC2, according to my SA. The following code snippet does not result in the expected result: $sorted_array = imap_sort($mbox, SORTDATE, 0, SE_UID); $sequence = implode(",",$sorted_array); $overview = imap_fetch_overview($mbox,$sequence,FT_UID); if(is_array($overview)) { reset($overview); while( list($key,$val) = each($overview)) { print $val->msgno . " - " . $val->date . " - " . $val->subject . "<br>\n"; } } else { print "Bollocks, overview fails again<br>\n"; } I would expect that this code snippet would return a header for each message in the mailbox I have opened in my imap_open call. The behavior I experience is that I will get a small number of headers (call it $x) the first time I run imap_fetch_overview. If I put imap_fetch_overview in a for/while loop, it will return $x+1 headers ($x seems to increment each iteration) on each iteration. I do not change the sequence I give to imap_fetch_overview while doing this. I have also tried setting sequence to the first and last message UID, seperated by a :. This results in the same behavior. For example, if I have a mailbox with 70 messages, the first iteration will return 9 headers. The next 10, after that 11, and so on until eventually it appears to not get a full header for a message. I'm guessing it hits the script time execution limit when this happens but I have not tested increasing that limit to see what happens. If I have missed any relevant information, please let me know and I'll provide it as soon as possible. Thanks Jason ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18791&edit=1

« previous php.bugs (#16214) next »