#19716 [Fbk]: imap_headers() returns wrong number of items
| From: | sniper@php.net | Date: | Sat, 12 Oct 2002 15:32:28 +0000 |
| Subject: | #19716 [Fbk]: imap_headers() returns wrong number of items | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-22240@lists.php.net to get a copy of this message | ||
ID: 19716
Updated by: sniper@php.net
Reported By: tero@alias.fi
Status: Feedback
Bug Type: IMAP related
Operating System: linux
PHP Version: 4.2.3
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2002-10-03 01:08:36] teroNOSPAM@alias.fi
I installed c-client from IMAP 2002 RC6.
------------------------------------------------------------------------
[2002-10-02 10:50:02] sniper@php.net
What c-client version you have?
------------------------------------------------------------------------
[2002-10-02 08:26:09] tero@alias.fi
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 this bug report at http://bugs.php.net/?id=19716&edit=1