#19716 [Com]: imap_headers() returns wrong number of items

From: Date: Thu, 03 Oct 2002 06:08:37 +0000
Subject: #19716 [Com]: imap_headers() returns wrong number of items
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-21348@lists.php.net to get a copy of this message
ID: 19716 Comment by: teroNOSPAM@alias.fi Reported By: tero@alias.fi Status: Feedback Bug Type: IMAP related Operating System: linux PHP Version: 4.2.3 New Comment: I installed c-client from IMAP 2002 RC6. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#21348) next »