[sync] [horde] Sync with Funambol SOLVED

Paul Faure paul.faure at agr.gc.ca
Wed Nov 12 18:33:16 UTC 2008


Figured out my problem.

I got some debug code from:
  turba/scripts/import_vcards.php
and used it in:
  lib/SyncML/Backend/Horde.php


--- /horde/lib/SyncML/Backend/Horde.php.orig      2008-11-12 12:22:29.000000000 -0500
+++ /horde/lib/SyncML/Backend/Horde.php   2008-11-12 13:24:20.000000000 -0500
@@ -395,12 +395,13 @@
                 $this->createUidMap($database, $cuid, $suid, $ts);
             }
         } else {
+            $errStr=$suid->toString();
             // Failed import. Maybe the entry is already there. Check if a
             // guid is returned:
             if ($suid->getDebugInfo()) {
                 $suid = $suid->getDebugInfo();
                 $this->logMessage(
-                    'Adding client entry to server: already exists with server id ' . $suid,
+                    'Adding client entry to server: already exists with server id ' . $suid . ': ' . $errStr,
                     __FILE__, __LINE__, PEAR_LOG_NOTICE);
                 if ($this->_backendMode == SYNCML_BACKENDMODE_SERVER) {
                     $this->createUidMap($database, $cuid, $suid, 0);


The above change added this to the log file:

  errstr=[pear_error: message="Permission denied" code=0 mode=return level=notice prefix="" info="3e37b9140457c0f37039de9227cb4915"]


The "default address book when adding or importing contacts." was set to
another users address book, and not mine.
So updating contacts would work, since it was updating them in the
correct location (my address book), but inserting new ones on the server
which originated from the client would give me permission issues.

Paul

On Mon, 2008-11-10 at 12:07 -0500, Paul Faure wrote:

> > > My setup is simple.
> > > Client (Outlook or iPhone) <-> Server (Horde) <-> DB (mysql)
> > 
> > Is this the setup when doing the synchronization, i.e. with a SyncML client?
> 
> Yea, thats the setup. SyncML client (Funambol) on Outlook or iPhone. 
> 
> > > I would imagine this is the most popular setup out there.
> > >
> > > In order to make my contacts more accessible, I installed OpenLDAP with
> > > the DB backend. This is a read only LDAP setup, so you can't modify
> > > contacts or add them through LDAP. OpenLDAP simply uses the horde DB to
> > > display the contacts.
> > >
> > > Client (Outlook) <- Server (OpenLDAP) <- DB (mysql)
> > 
> > But how is Turba accessing the address book? Through SQL or LDAP?
> 
> Turba uses SQL. No portion of Horde uses LDAP.
> 
> Its OpenLDAP which uses the Horde DB.
> 
> > > The one change I had to do to the horde env/setup is the addition of the
> > > "id" column in the turba table. This is because the SQL backend for
> > > OpenLDAP requires an INT as the unique key.
> > > I implemented this setup about 6 months ago and it all worked fine until
> > > the recent upgrade.
> > 
> > And how did you map the column in Turba? To which attribute?
> 
> I didnt change the Turba code, so its using the same default column.
> 
> > > Could you point me in the direction of where in Horde the UID is
> > > generated? I will add all kinds of debug output and track this one down.
> > 
> > In Turba_Driver::add(), the call to generateUID().
> 
> Thanks, I will take a look shortly.
> 
> Paul
> 
> --
> sync mailing list - Join the hunt: http://horde.org/bounties/#sync
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: sync-unsubscribe at lists.horde.org


More information about the sync mailing list