[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: homePostalAddress attribute

Today at 6:07pm, Tony Earnshaw wrote:

> man, 2002-11-18 kl. 16:35 skrev Frank Swasey:
> > > AFAIK the absence of EQUALITY des not allow to delete a specific value,
> > > since no matching applies, that is to delete a value you need to delete
> > > all and re-add the ones you wanted to preserve.
> > True, which also means that you can't do it with PHP's LDAP support.
> > Not that that is necessarily bad , in the opinion of a PERL hack :-)
> PHP 4.2.3 is *not* capable of this. Even John Hallam's de facto top PHP4
> utility isn't. .Shoot. Because I have to do it with PHP and am in the
> process of working up to it with my own code.
> On the other hand, GQ 0.7.0beta2 can.
> So it's *not* universally true, but I wish that PHP4 could do it.

True, Perl's Net::LDAP module can do it too.  The difference is that the
PHP form of deleting a value issues something like the following syntax:

dn: netid=fcs,ou=People,dc=uvm,dc=edu
changetype: modify
delete: stupidattribute
stupidattribute: current value

While GQ and Perl seem to be doing:

dn: netid=fcs,ou=People,dc=uvm,dc=edu
changetype: modify
delete: stupidattribute

The difference between those two forms causes PHP to be UNABLE to delete
any attribute which doesn't have an EQUALITY clause, or has one that
OpenLDAP doesn't support.

While the PHP version is actually better (in the long run) because it
will not delete a value other than the one intended, OpenLDAP is unable
to support that because it has both attributes that do not have EQUALITY
checks defined and also has schema files that define attributes with
EQUALITY checks that it (openldap) doesn't implement.

Frank Swasey                    | http://www.uvm.edu/~fcs
Systems Programmer              | Always remember: You are UNIQUE,
University of Vermont           |    just like everyone else.
                    === God Bless Us All ===