Bug #66284 [Opn->Csd]: search does not work when using reopen
| From: | wdehoog at exalondelft dot nl | Date: | Mon, 23 Dec 2013 14:41:10 +0000 |
| Subject: | Bug #66284 [Opn->Csd]: search does not work when using reopen | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-183450@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66284&edit=1
ID: 66284
User updated by: wdehoog at exalondelft dot nl
Reported by: wdehoog at exalondelft dot nl
Summary: search does not work when using reopen
-Status: Open
+Status: Closed
Type: Bug
Package: IMAP related
Operating System: linux
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
It appeared to be a problem with the dovecot search backend (fts-squat). Sorry for the noise.
Previous Comments:
------------------------------------------------------------------------
[2013-12-13 13:32:37] wdehoog at exalondelft dot nl
Description:
------------
My php script walks a collection mailboxes to perform an imap_search. When I open each mailbox using
imap_open the results are always correct. imap_open however is very slow so I started to use
imap_reopen.
Unfortunately imap_search now often does not find anything anymore. Sometimes it finds them all,
sometimes only in some of the mailboxes but most of the time it finds nothing.
Restarting apache or dovecot (imap server) does not make any difference.
Doing an imap_open after 5 times imap_reopen make the script show more results but still not all of
them.
Test script:
---------------
$reopened = imap_reopen($stream, $current_mailbox['mailserver'].$val['name'],
OP_READONLY);
if($reopened) {
$emails = imap_search($stream, $imap_pattern, SE_UID);
...
}
Expected result:
----------------
bot after imap_open as well as after imap_reopen the imap_search function should be able to find the
mails.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66284&edit=1