[turba] ldap address book configuration
Chuck Hagenbuch
chuck at horde.org
Mon Jul 11 06:22:47 PDT 2005
Quoting Guillaume Barreau <g.barreau at gmail.com>:
> The example of a shared ldap directory that comes in sources.php.dist
> (localldap) does not work out of the box and causes an "object
> violation" error when you try to add a contact. The reason, I ended up
> finding out from other posts on this list, is that contacts are
> entered in the ldap directory as 'person' and that kind of objects
> mandates an 'sn' field which in the distribution example is not set.
>
> Shouldn't that be fixed? It seems confusing to give an example that is
> not functional at heart.
>
> Now in the scripts directory there is a patch to the core ldap schema
> which will redefine the class 'person' so that the sn field becomes
> optional. To me that seems like a really bad way of getting things to
> work. It is not at all in the ldap spirit to have users redefine the
> core schemas. There is instead a simple mechanism to create new
> schemas if you don't like the ones provided.
>
> But in any case, the best solution to get the example to work would be
> to find a way to put something in the sn field. One way I got it to
> work was to move to a situation where users have to provide a
> firstName and lastName (as opposed to just one Name entry) and put
> lastName in the sn field. That can be done by changing sources.php and
> attributes.php pretty easily.
Okay - a patch for the shared configuration would be great. We'll
remove the core.schema patch once you submit a tweaked example that
works.
> Even better would be to find a solution which would work with a single
> name field. One way would be to map the name attribute to both the cn
> and sn attributes in ldap. I have tried putting both:
> 'name' => 'cn',
> 'name' => 'sn',
> in sources.php but that didn't work. Does anybody know how to do that?
We'd have to change the config format a bunch for that; simply doesn't
work in PHP.
> Another way to solve the problem would be to use the following fields
>
> // check if all required attributes for an entry are set and add them
> // if needed.
> 'checkrequired' => true,
> // string to put in missing required attributes.
> 'checkrequired_string' => ' ',
>
>
> which seem perfect for putting ' ' into sn so that no violation
> occurs. However, when I tried to set it to true, the following error
> arises:
>
> Fatal error: _checkrequiredattributes(): Failed opening required
> 'Net/LDAP.php'
> (include_path='/var/www/horde/lib:.:/usr/share/php:/usr/share/pear')
> in /var/www/horde/turba/lib/Driver/ldap.php on line 519
The error is pretty clear, no?
pear install Net_LDAP
-chuck
--
"But she goes not abroad in search of monsters to destroy." - John
Quincy Adams
More information about the turba
mailing list