Summary | ActiveSync: PHP warning for empty folders |
Queue | Synchronization |
Queue Version | Git master |
Type | Bug |
State | Not A Bug |
Priority | 1. Low |
Owners | |
Requester | thomas.jarosch (at) intra2net (dot) com |
Created | 05/14/2013 (4450 days ago) |
Due | |
Updated | 05/15/2013 (4449 days ago) |
Assigned | |
Resolved | 05/14/2013 (4450 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
imap libraries have seen lots of changes since FRAMEWORK_5_0 so it's
likely that this doesn't even happen anymore (I can't reproduce here).
If you see this while testing with master code then please reopen.
The framework libraries will not be seeing any more bug fixes on the
FRAMEWORK_5_0 branch.
why is
2013-05-14T10:42:16+02:00 WARN: HORDE [horde] PHP ERROR:
array_combine() [<a
href='function.array-combine'>function.array-combine</a>]: Both
parameters should have an equal number of elements [pid 3162 on line
3499 of
"/datastore/DEVEL/horde/framework/Imap_Client/lib/Horde/Imap/Client/Base.php"
not a bug?
Summary ⇒ ActiveSync: PHP warning for empty folders
Contacts f.e. work fine.
It was only syncing messages of the last seven days, so the folders
appeared empty.
Additionally the PHP error message for the empty folder fooled me...
The PHP error message is only shown if the requested folder is empty.
That still leaves the problem that no messages are synced anymore.
Contacts f.e. work fine.
--- a/framework/Imap_Client/lib/Horde/Imap/Client/Base.php
+++ b/framework/Imap_Client/lib/Horde/Imap/Client/Base.php
@@ -3496,6 +3496,15 @@ abstract class Horde_Imap_Client_Base
implements Serializable
return $res['match'];
}
+ $debug_str = sprintf("TOMJ: ids->ids: %s,
res['match]->ids: %s", print_r($ids->ids, true),
print_r($res['match']->ids, true));
+ $e = new LogicException('TOMJ2: Get me a nice stack trace');
+ $debug_str2 = $e->getTraceAsString();
+ $debug_str3 = sprintf("TOM3: convert: $convert, mailbox:
%s", print_r($mailbox, true));
+
+ Horde::logMessage($debug_str);
+ Horde::logMessage($debug_str2);
+ Horde::logMessage($debug_str3);
+
$map->update(array_combine($ids->ids, $res['match']->ids));
}
Resulting output:
[pid 17730 on line 3506 of
"/datastore/DEVEL/horde/framework/Imap_Client/lib/Horde/Imap/Client/Base.php"]
2013-05-14T11:24:59+02:00 INFO: HORDE [horde] TOMJ: ids->ids: Array
(
[0] => 0
[1] => 1
)
, res['match]->ids: Array
(
)
[pid 17730 on line 3504 of
"/datastore/DEVEL/horde/framework/Imap_Client/lib/Horde/Imap/Client/Base.php"]
2013-05-14T11:24:59+02:00 INFO: HORDE [horde] #0
/datastore/DEVEL/horde/framework/Imap_Client/lib/Horde/Imap/Client/Base.php(2596): Horde_Imap_Client_Base->resolveIds(Object(Horde_Imap_Client_Mailbox), Object(Horde_Imap_Client_Ids),
1)
#1/datastore/DEVEL/horde/framework/Imap_Client/lib/Horde/Imap/Client/Base.php(2481): Horde_Imap_Client_Base->_fetchWrapper(Object(Horde_Imap_Client_Mailbox), Object(Horde_Imap_Client_Fetch_Query),
Array)
#2/datastore/DEVEL/horde/framework/ActiveSync/lib/Horde/ActiveSync/Imap/Adapter.php(328): Horde_Imap_Client_Base->fetch(Object(Horde_Imap_Client_Mailbox), Object(Horde_Imap_Client_Fetch_Query),
Array)
#3/datastore/DEVEL/horde/framework/Core/lib/Horde/Core/ActiveSync/Driver.php(584): Horde_ActiveSync_Imap_Adapter->getMessageChanges(Object(Horde_ActiveSync_Folder_Imap),
Array)
#4/datastore/DEVEL/horde/framework/ActiveSync/lib/Horde/ActiveSync/State/Sql.php(807): Horde_Core_ActiveSync_Driver->getServerChanges(Object(Horde_ActiveSync_Folder_Imap), 1368522038, 1368523499, 1368264299,
false)
#5/datastore/DEVEL/horde/framework/ActiveSync/lib/Horde/ActiveSync/Sync.php(137):
Horde_ActiveSync_State_Sql->getChanges(Array)
#6/datastore/DEVEL/horde/framework/ActiveSync/lib/Horde/ActiveSync/Request/Sync.php(621): Horde_ActiveSync_Sync->init(Object(Horde_ActiveSync_State_Sql), Object(Horde_ActiveSync_Connector_Exporter),
Array)
#7/datastore/DEVEL/horde/framework/ActiveSync/lib/Horde/ActiveSync/Request/Base.php(218):
Horde_ActiveSync_Request_Sync->_handle()
#8/datastore/DEVEL/horde/framework/ActiveSync/lib/Horde/ActiveSync.php(647):
Horde_ActiveSync_Request_Base->handle()
#9/datastore/DEVEL/horde/framework/Rpc/lib/Horde/Rpc/ActiveSync.php(141):
Horde_ActiveSync->handleRequest('Sync', '356938030416912')
#10/datastore/DEVEL/horde/horde/rpc.php(156):Horde_Rpc_ActiveSync->getResponse(NULL)
#11{main} [pid 17730 on line 3505 of"/datastore/DEVEL/horde/framework/Imap_Client/lib/Horde/Imap/Client/Base.php"]
2013-05-14T11:24:59+02:00 INFO: HORDE [horde] TOM3: convert: 2,
mailbox: Horde_Imap_Client_Mailbox Object
(
[_utf7imap:protected] => 1
[_utf8:protected] => INBOX/Sufi
)
[pid 17730 on line 3506 of
"/datastore/DEVEL/horde/framework/Imap_Client/lib/Horde/Imap/Client/Base.php"]
2013-05-14T11:24:59+02:00 WARN: HORDE [horde] PHP ERROR:
array_combine() [<a
href='function.array-combine'>function.array-combine</a>]: Both
parameters should have an equal number of elements [pid 17730 on line
3508 of
"/datastore/DEVEL/horde/framework/Imap_Client/lib/Horde/Imap/Client/Base.php"]
For the record:
I've cleared all horde caches and ActiveSync states. The backtrace is
from my local tree running the backported
bug #12224fix, but as Isaid, it also failed with the vanilla commit mentioned earlier.
New Attachment: 356938030416912.txt
(does not show any messages, but displays the folder list).
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ ActiveSync no longer syncs / PHP error
Queue ⇒ Synchronization
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
I just discovered that ActiveSync no longer syncs my test box. This is
what I get in the logs:
2013-05-14T10:42:16+02:00 WARN: HORDE [horde] PHP ERROR:
array_combine() [<a
href='function.array-combine'>function.array-combine</a>]: Both
parameters should have an equal number of elements [pid 3162 on line
3499 of
"/datastore/DEVEL/horde/framework/Imap_Client/lib/Horde/Imap/Client/Base.php"
I'm not sure if it's related to upgrading to origin/FRAMEWORK_5_0
HEAD, I've also tried a "vanilla"
1b4fc14eeeab4a98e92538143eef3abaa9ad7dd5 commit without any local
changes.
I'm pretty sure it was working last week, dimp shows the messages just
fine. I'll try to add some debug logging to the mentioned PHP error
line.
Thomas