Bug #66284 [NEW]: search does not work when using reopen
| From: | wdehoog at exalondelft dot nl | Date: | Fri, 13 Dec 2013 13:32:38 +0000 |
| Subject: | Bug #66284 [NEW]: search does not work when using reopen | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-183314@lists.php.net to get a copy of this message | ||
From: wdehoog at exalondelft dot nl
Operating system: linux
PHP version: Irrelevant
Package: IMAP related
Bug Type: Bug
Bug description:search does not work when using reopen
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 bug report at https://bugs.php.net/bug.php?id=66284&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66284&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66284&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66284&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66284&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66284&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66284&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66284&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66284&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66284&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66284&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66284&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66284&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66284&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66284&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66284&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66284&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66284&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66284&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66284&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66284&r=mysqlcfg