#38890 [Opn->Bgs]: imap_sort() returns array of empty values
| From: | Russell dot Mosemann at cune dot edu | Date: | Sun, 24 Sep 2006 18:36:32 +0000 |
| Subject: | #38890 [Opn->Bgs]: imap_sort() returns array of empty values | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-102601@lists.php.net to get a copy of this message | ||
ID: 38890
User updated by: Russell dot Mosemann at cune dot edu
Reported By: Russell dot Mosemann at cune dot edu
-Status: Open
+Status: Bogus
Bug Type: IMAP related
Operating System: Debian 3.1 Etch
PHP Version: 5.1.6
New Comment:
After debugging the code, the problem was traced to imap-200x using
US-ASCII as the default character set when no character set was
specified but Courier IMAP 1.7.3 not recognizing that character set.
That caused an error to be returned by imap_sort().
One solution is to replace US-ASCII in imap-200x/src/c-client/imap4r1.c
with ISO-8859-1 as the default character set. After making that change.
imap_sort() returns the expected values.
Previous Comments:
------------------------------------------------------------------------
[2006-09-20 02:04:26] Russell dot Mosemann at cune dot edu
Description:
------------
imap_sort($stream, SORTARRIVAL, 1) returns an array with the same
number of items as messages in the mailbox (e.g., 438 messages), but
each location in the array is empty. The problem occurs with (imap-2002
or imap-2006) and (4.4.2 or 4.4.4 or 5.1.6 or 5.2R4). Reading from the
Courier IMAP server with other clients works fine. This is being
compiled as a module for Apache 2.2.3. The default locale on the server
is en_US.UTF-8.
configure --with-apxs2=/local/apache/bin/apxs --disable-cli \
--disable-cgi --without-pear --disable-ipv6 --disable-all \
--with-imap=/local/home/mose/imap-2006 \
--with-ldap --with-mysql --with-mysql-sock --with-pcre-regex
Reproduce code:
---------------
imap_open($stream, $user, $password, $options);
return imap_sort($stream, SORTARRIVAL, 1);
Expected result:
----------------
The returned array should be a list of integers representing messages
ordered by arrival date and time.
Actual result:
--------------
Each location of the array is empty. It is as if the message numbers
were lost, or the message number is being retrieved from the wrong
place.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38890&edit=1