ID: 21168 User updated by: slusarz at colorado dot edu Reported By: slusarz at colorado dot edu Status: Wont fix Bug Type: IMAP related Operating System: RedHat Linux 8.0 PHP Version: 4.3.0RC4 New Comment:
The workaround we developed, using PHP code, can be found at: http://cvs.horde.org/cvs.php/horde/lib/IMAP/Search.php Previous Comments: ------------------------------------------------------------------------ [2003-06-16 16:35:15] [EMAIL PROTECTED] This is really not a php problem to solve, PHP uses mail_criteria(), an imap function used to determine the nature of the search. Unfortunately, this function only supports IMAP2 functionality and does not support IMAP4 directives, which is what prevents you from using OR keyword. Until the author of c-client decided to introduce mail_criteria() equivalent that supports IMAP4 don't expect to see OR keyword support in PHP. ------------------------------------------------------------------------ [2002-12-23 19:00:02] slusarz at colorado dot edu I sent this to Dan in August and haven't seen anything done about it yet, so I will put it here. Note that the c-client DOES support the OR keyword (see the MARC article listed below) - it appears that PHP is not configuring the search correctly to use the keyword though. ----- Quoting Dan Kalowsky <[EMAIL PROTECTED]>: | Hi there, | | Jon Pairse has given me your email regarding a commit you did on the IMP | project for HORDE. Not being very familiar with IMP, any chance you can | give me a sample piece of PHP code for what doesn't work with the | imap_search() function in PHP? | | I'll see if I can get that fixed for 4.3.0 For imap_search() code, go to: http://cvs.horde.org/co.php/imp/lib/Filter.php?login=2&r=1.20 The code is in the _matchFilter() method. It generates a search query that looks like the following: UNDELETED OR FIELD1 "FOOBAR1" OR FIELD2 "FOOBAR2" FIELD3 "FOOBAR3" Running this query directly on my imap installation (courier-imap 1.5), it correctly does an OR search on FIELD1, FIELD2, FIELD3. This search returns no results in PHP on the same mailbox. My lame attempt to figure out the problem can be found here: http://marc.theaimsgroup.com/?l=imp&m=102832554619977&w=2 ----- ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21168&edit=1
