[sync] Problems syncing with funambol clients
Remko Muis
remko at familiemuis.net
Wed Aug 12 10:05:54 UTC 2009
Hi Jan,
If I add a line
Horde::logMessage('Mime type is ' . $_SERVER['CONTENT_TYPE'] , __FILE__,
__LINE__, PEAR_LOG_DEBUG);
to rpc.php, I get php errors, saying: Undefined index: CONTENT_TYPE in
/var/www/html/horde/rpc.php.
If I put the logMessage command in an if-else clause, then no errors appear:
if (!empty($_SERVER['CONTENT_TYPE'])) {
Horde::logMessage('Mime type is ' . $_SERVER['CONTENT_TYPE'] , __FILE__,
__LINE__, PEAR_LOG_DEBUG);
//Logging does not result in anything in log.txt or horde.log: where
does it log to?
} else {
Horde::logMessage('Mime type is leeg!!', __FILE__, __LINE__,
PEAR_LOG_DEBUG);
}
So it seems that the variable CONTENT_TYPE is not set at all. This
explains why $serverType is set to 'Soap', which is the default.
By the way: no log messages appear in horde.log, even though de log
level has been set to PEAR_LOG_DEBUG in Horde's config. Neither are
there any client or server XML messages in /tmp/sync.
As to manually setting $serverType: I know that there are more things to
set (read rpc.php carefully), and I did that, but unfortunately to no avail.
So: unless you can explain of why CONTENT_TYPE is not set to some mime
type, I'm stuck...
Thanks for your help so far anyway!
Best,
Remko
Jan Schneider schreef:
> Zitat von Remko Muis <remko at familiemuis.net>:
>
>> Hi Jan,
>>
>> Thanks for your suggestions. I added the following line after the first
>> if-then-else statement in rpc.php:
>> Horde::logMessage('Mime type is ' . $serverType , __FILE__, __LINE__,
>> PEAR_LOG_DEBUG);
>
> You want to know the mime type, not the server type. We already know
> that the server type is "soap".
> Log $_SERVER['CONTENT_TYPE'] instead of $serverType.
>
>> But -ehm- in which log file should I look to find the resulting message?
>
> Depends on how you configured logging in Horde. Usually
> /tmp/horde.log, but DEBUG messages are not logged by default, so check
> your config.
>
>> I also tried to force the rpc backend to think the request was in syncml
>> format (by setting $serverType to syncml). If I then try to sync, I do
>> get log files and xml files in /tmp/sync, but the request (client) files
>> are empty and the server files only have one line:
>> <?xml version="1.0" encoding="UTF-8"?>
>> That's all. When syncing, an error occurs (of course, because the
>> response is empty).
>
> There are more things to set, see rpc.php.
>
>> From the logs in the Mozilla plugin, I guess that the request is done in
>> text/xml, so you might be right after all that the client sends the
>> requests in the wrong mime-type.
>> So I tried to install an older version of the plugin, but now TB crashes
>> everytime I restart after adding whichever version of the plugin. Nice
>> piece of software...
>>
>> I got the impression that many people have it working, so why wouldn't
>> it work for me? Maybe I have to look for another solution to sync:
>> 1. Thunderbird/Lightning addressbook and calendar
>> 2. WinMobile contacts and calendar
>> 3. MS Outlook calendar
>> with Horde or the MySQL DB behind it. Any suggestions other than
>> Funambol?
>>
>> Best,
>> Remko
>>
>>
>>
>>
>> Jan Schneider schreef:
>>> Zitat von Remko Muis <remko at familiemuis.net>:
>>>
>>>> Hi Jan,
>>>>
>>>> Thanks for your help. I already have both mime types in my
>>>> /etc/mime.types. However, I doubt that the clients themselves are
>>>> broken, since I tried the mozilla plugin on two different machines,
>>>> and
>>>> the WinMobile plugin on my phone. That makes three independent
>>>> instances. Might it be that Apache is forwarding the request
>>>> somehow in
>>>> the wrong mime type?
>>>
>>> This is unlikely, but the only explanation I have right now. Or maybe
>>> your PHP installation doesn't populate the $_SERVER['CONTENT_TYPE']
>>> variable correctly.
>>>
>>>> But then, why is the Outlook plugin working?
>>>
>>> No idea.
>>>
>>>> What
>>>> happens when rpc.php is loaded?
>>>
>>> Take a look at the code. It basically runs several tests against the
>>> incoming request to determine which RPC backend is supposed to answer
>>> the call.
>>> SyncML is being used if the mentioned variable has one of the SyncML
>>> mime types.
>>> You can try adding Horde::logMessage() calls in rpc.php to see what
>>> the values are and what the code path is.
>>>
>>>> Does it have to do with the required
>>>> pear packages?
>>>
>>> No.
>>>
>>>> Jan Schneider schreef:
>>>>> Zitat von Remko Muis <remko at familiemuis.net>:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> I use the latest stable cvs version of horde, framework libs and
>>>>>> several
>>>>>> applications. On my pocket-pc, I installed the funambol plugin for
>>>>>> Windows Mobile Pocket PC's, v. 7.2. In Thunderbird, I have v.
>>>>>> 0.9.1 of
>>>>>> the Funambol Mozilla Sync Client installed. Neither of these work,
>>>>>> although I followed the directions of the Wiki, have all the
>>>>>> required
>>>>>> pear packages installed (as far as I can see), commented out the
>>>>>> 'realm'
>>>>>> line in servers.php, disabled compress pages, etc. There are no
>>>>>> logs in
>>>>>> /tmp/sync and nothing reported in /tmp/horde.log. I don't use SSL,
>>>>>> because I use self-signed certificates.
>>>>>>
>>>>>> The Win Mobile plugin simply says: Please wait: checking your
>>>>>> credentials... and then complains: Sync not completed, please try
>>>>>> later.
>>>>>> If the error persists, contact Technical support. Syncing with
>>>>>> myFunambol works, however.
>>>>>>
>>>>>> The Mozilla plugin is more informative, the log is attached. I tried
>>>>>> contacts, notes and tasks separately, but to no avail.
>>>>>>
>>>>>> I also use the funambol plugin for Outlook, which works better (but
>>>>>> seems to crash when encountering recurring events), so the strange
>>>>>> thing
>>>>>> is that I have a working combination of horde + one Funambol
>>>>>> plugin, but
>>>>>> can't get other plugins to work!
>>>>>>
>>>>>> Can anybody please help me out? Thanks in advance!
>>>>>
>>>>> The server thinks this is a SOAP request. This could only happen if
>>>>> the client is sending the request with an incorrect MIME type. To
>>>>> correctly determine SyncML requests, the incoming MIME type must be
>>>>> either application/vnd.syncml+xml or application/vnd.syncml+wbxml. If
>>>>> the clients send something different, it's broken.
>>>>>
>>>>> Jan.
>>>>>
>>>>
>>>
>>>
>>>
>>> Jan.
>>>
>>
>>
>>
>> ----------------------------------------------------------------
>> This message was sent using IMP, the Internet Messaging Program.
>>
>
>
>
> Jan.
>
More information about the sync
mailing list