Subject: PHP imap_sort fails when c-client >=2002 and SE_UID and imapserver has no SORT capability

From: Joerg Friedrich <[email-masked]>
Date: Thu, 20 Feb 2003 20:26:31 +0100

Hi!

I encountered a problem with the PHP function 'imap_sort'
The PHP-people told me, that this must be an error in c-client not in
PHP.

At our universitiy in Constance, Germany we use imp from www.horde.org
as Webmailfrontend to our imap-server. We want to update our current
version of this Webmailservice to the newest releases. ATM I'm testing
all these things. While setting up the test environment with newest PHP
I linked it against c-client.a from 2002b. This was no problem, but
while playing around with the system there where errors which I was able
to track down to the imap_sort function from php which is used by imp.

The bug is this. When:
1. php_imap is linked against libc-client.a >= 2002
2. the imapserver has no SORT capability
   here former iPlanet now SunOne<blabla> imapserver
3. request from imap_sort to return UIDs with SE_UID

imap_sort returns an empty array.

I did some test which results are these:

php compiled against       |      imap_sort(...,SE_UID)
imap-2001a w/o ssl         |       works
imap-2001a w/  ssl         |       works
imap-2002b w/o ssl         |       doesn't works
imap-2002b w/  ssl         |       doesn't works
imap-2003-dev w/o ssl      |       doesn't works
imap-2003-dev w/  ssl      |       doesn't works

BTW: Our servers run Solaris 8. I was told by someone on irc that in a
Linux-Environment this is no problem.

Can anyone help?

-- 
Heute ist nicht alle Tage, ich komm' wieder, keine Frage!!!

   Joerg

brain, v: [as in "to brain"]
	To rebuke bluntly, but not pointedly; to dispel a source
	of error in an opponent.
		-- Ambrose Bierce, "The Devil's Dictionary"
-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Thu, 20 Feb 2003 11:53:38 -0800 (PST)

Does the following patch resolve this problem?

1758c1758
<       mail_search_full (stream,charset,spg,flags);
---
>       mail_search_full (stream,charset,spg,flags & SE_NOSERVER);

---

From: Joerg Friedrich <[email-masked]>
Date: Fri, 21 Feb 2003 12:16:42 +0100

YES!!!

Thanks :-)

   Joerg

Linux: The OS people choose without $200,000,000 of persuasion.
	-- Mike Coleman