[sync] SyncML broken with latest Horde Webmail 5.2.22 ?

Christian Bomhardt horde at bomhardt.de
Sat Sep 23 20:35:17 UTC 2017


On 23.09.2017 15:59, Christian Bomhardt wrote:
> On 22.09.2017 21:01, Jan Schneider wrote:
>> Please don't top-post.
>>
>> Zitat von Christian Bomhardt <horde at bomhardt.de>:
>>
>>> On 22.09.2017 10:40, Jan Schneider wrote:
>>>>
>>>> Zitat von Christian Bomhardt <horde at bomhardt.de>:
>>>>
>>>>> Hi Friends,
>>>>>
>>>>> I just upgraded to Horde Webmail 5.2.22 with php7 (from 5.2.16?). 
>>>>> My used Android SyncML Client (ChBoSync) doesn't work any more - 
>>>>> with Webmail 5.2.21 as installed on demo.horde.org, it still 
>>>>> works. So issue could either be related to Horde Version or 
>>>>> underlying Linux/php.
>>>>>
>>>>> What I figured out so far via Debugging:
>>>>>
>>>>> Some errors are logged trying to call non-static methods. To fix 
>>>>> it, I did the following:
>>>>>
>>>>> In Horde_SyncML_Backend.php: make factory method static
>>>>>
>>>>> In Horde_SyncML_Command.php: make factory method static
>>>>>
>>>>> In Horde_SyncML_XmlOutput.php: make singleton method static
>>>>>
>>>>>
>>>>> Now I have this issue and don't know how to fix it - seems like 
>>>>> the issue is in the ContentHandler.php, line 119 => 
>>>>> $this->_xmlWriter->init(new Horde_Xml_Wbxml_ContentHandler());
>>>>>
>>>>> Any ideas how to fix/patches ?
>>>>>
>>>>> Thanks a ton,
>>>>>  Christian
>>>>>
>>>>>
>>>>> 2017-09-21T20:27:52+00:00 DEBUG: HORDE [horde] 
>>>>> Horde_Rpc::__construct complete [pid 29037 on line 253 of 
>>>>> "/usr/share/php/Horde/Rpc.php"]
>>>>> 2017-09-21T20:27:52+00:00 DEBUG: HORDE Backend of class 
>>>>> Horde_SyncMl_Backend_Horde created [pid 29037 on line 38 of 
>>>>> "/usr/share/php/Horde/SyncMl/Backend/Horde.php"]
>>>>> 2017-09-21T20:27:52+00:00 DEBUG: HORDE Started at 2017-09-21 
>>>>> 20:27:52. Packet logged in /tmp/sync/client_17.xml [pid 29037 on 
>>>>> line 100 of "/usr/share/php/Horde/SyncMl/ContentHandler.php"]
>>>>> 2017-09-21T20:27:52+00:00 NOTICE: HORDE PHP ERROR: Only variables 
>>>>> should be passed by reference [pid 29037 on line 119 of 
>>>>> "/usr/share/php/Horde/SyncMl/ContentHandler.php"]
>>>>> 2017-09-21T20:27:52+00:00 DEBUG: HORDE 1. 
>>>>> Horde_Rpc_Syncml->getResponse() /var/www/horde/rpc.php:160
>>>>> 2. Horde_SyncMl_ContentHandler->process() 
>>>>> /usr/share/php/Horde/Rpc/Syncml.php:52
>>>>> 3. Horde_ErrorHandler::errorHandler() 
>>>>> /usr/share/php/Horde/SyncMl/ContentHandler.php:119
>>>>>
>>>>> 2017-09-21T20:27:52+00:00 WARN: HORDE PHP ERROR: 
>>>>> session_destroy(): Trying to destroy uninitialized session [pid 
>>>>> 29037 on line 305 of "/usr/share/php/Horde/Session.php"]
>>>>> 2017-09-21T20:27:52+00:00 DEBUG: HORDE  1. 
>>>>> Horde_Rpc_Syncml->getResponse() /var/www/horde/rpc.php:160
>>>>>  2. Horde_SyncMl_ContentHandler->process() 
>>>>> /usr/share/php/Horde/Rpc/Syncml.php:52
>>>>>  3. xml_parse() /usr/share/php/Horde/SyncMl/ContentHandler.php:131
>>>>>  4. Horde_SyncMl_ContentHandler->_endElement()
>>>>
>>>> Those are only warnings and notices because of the outdated 
>>>> Horde_SyncMl code. None of this is really an error stopping 
>>>> synchronization to work.
>>>>
>>>> Did you update PHP to version 7 at the same time, or just Horde?
>>>>
>>> Hi Jan,
>>>
>>> I did only update Horde - shortly before or after I applied as well 
>>> security patches. But php7 was already installed upfront (running on 
>>> Ubuntu 16.04 LTS)
>>>
>>> I now enabled the testpage to provide further details on php or 
>>> other findings. It crashed, from php log with errors below:
>>>
>>> 2017-09-22T16:15:28+00:00 EMERG: HORDE [horde] ParseError: syntax 
>>> error, unexpected 'new' (T_NEW) in /usr/share/php/File/Fstab.php:110
>>
>> This is a third-party library that's not compatible with PHP 7. It 
>> probably got pulled in as some dependency. You can uninstall it 
>> safely with "pear uninstall file_fstab". Though it won't be used with 
>> SyncML synchronization.
>>
>> Besides that, there haven't been any changes in the SyncML code for 
>> months if not years.
>>
>>> Stack trace:
>>> #0 /usr/share/php/Horde/Autoloader.php(65): 
>>> Horde_Autoloader->_include('/usr/share/php/...')
>>> #1 [internal function]: Horde_Autoloader->loadClass('File_Fstab')
>>> #2 [internal function]: spl_autoload_call('File_Fstab')
>>> #3 /var/www/internal/horde/lib/Test.php(619): 
>>> class_exists('File_Fstab')
>>> #4 /var/www/internal/horde/test.php(135): Horde_Test->pearModuleCheck()
>>> #5 {main} [pid 7335 on line 74 of 
>>> "/usr/share/php/Horde/ErrorHandler.php"]
>>> 2017-09-22T16:15:28+00:00 DEBUG: HORDE [horde] Max memory usage: 
>>> 2097152 bytes [pid 7335 on line 613 of 
>>> "/usr/share/php/Horde/Registry.php"]
>>>
>>> Regarding the trace below - if it was no error, why is the error 
>>> handler called? For the issues I solved before, log looked similar. 
>>> And SyncML is broken for all contacts, calendar and notes - so seems 
>>> to be some "framework" kind of issue?
>>>
>>> Any further ideas/hints?
>>>
>>> br, Christian
>>>
>>>
>>
>>
>>
> Removed file_fstab => "pear/File_Fstab" can be optionally used by 
> installed package horde/horde. Now test successfull, but no further 
> findings related to my problem.
>
> So I tried to sync against my Horde old webmail 5.2.16 installation 
> with full logging and some further details.
>
>
> What I figured out: while for the old installation, appInit 
> initializes Horde, kronolith, turba, nag and others while with the new 
> version, potential syncml sources like kronolith, turba, and nag are 
> NOT initialized.
>
> Tried to further debug, but a little bit difficult to understand. Any 
> ideas why those apps are (no longer) initialized (performance 
> improvements?)/how to understand what happens?
>
>
> thanks, Christian
>
>
>
Found it !

For reasons I do not understand, RespURI in the SyncML server response 
changed - while previously the inbound IP was returned, now configured 
server-name is returned. Which cannot get resolved from within my home 
network as it is a dyndns alias. Could not reproduce what caused this 
change - could be related to some OS updates and independent of horde 
update, but not 100% sure. As a quick and dirty fix, I tweaked XmlOutput 
to leave out the RespURI tag - and everything is fine again...at least 
my SyncML client doesn't require the field.


Thanks for your support, hopefully my findings prevent other people from 
spending many hours on the same thing.


br, Christian



More information about the sync mailing list