From: [EMAIL PROTECTED] Operating system: linux PHP version: 4.2.3 PHP Bug Type: IMAP related Bug description: imap_headers() returns wrong number of items
We are using Lotus Domino 5.0.11 as our IMAP server and it seems to work all right with other clients (like Mozilla). However when we run the script below it only returns correctly 7 oldest messages. All other messages get the following error message: Bad message number in /home/httpd/html/mail/messages.php count returns 61 messages. It happens in other folders than INBOX too. PHP was compiled using the following parameters: ./configure --with-mysql --with-apxs=/usr/sbin/apxs --with-imap --enable-exif --with-kerberos --with-zlib --with-zlib-dir=/usr/lib <?php echo "User: ".$_SERVER['PHP_AUTH_USER']."<br><br>"; $link=imap_open("{localhost/imap}INBOX",$_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']); $sorted_array=imap_sort($link,SORTDATE,1); $headers=imap_headers($link); echo "<br><b>Your messages (".count($sorted_array).")</b><br><hr>"; for ($x = 1;$x < count($sorted_array); $x++) { $msgnum=next($sorted_array); $header=imap_header($link,$msgnum, 80,80); echo "<a href=\"view.php?num=$msgnum\">$header->fromaddress: ".$header->subject."</a> (ID: $msgnum)<br>"; } imap_close($link); ?> -- Edit bug report at http://bugs.php.net/?id=19716&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19716&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19716&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19716&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19716&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19716&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19716&r=support Expected behavior: http://bugs.php.net/fix.php?id=19716&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19716&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19716&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19716&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19716&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=19716&r=dst