[Date Prev][Date Next]
Re: How can I lock a record using php-ldap?
Jim C said:
>> As has already been pointed out, this sem_get() approach only works if
>> all of your operations come from the same machine. Since the purpose
>> of using an LDAP directory is to provide distributed access to
>> information, this solution really isn't appropriate in the general
> <nods>So you say and I am *not* argueing that such a case is not
> possible or that you are wrong. I *am* argueing that makeing such an
> assertion is meaningless without evidence of the possibility, which, as
> one might expect, is not covered in the docs. Life couldn't be that
> simple, right? ;-)
You know, I'm not really sure what question is being asked here... Can
you restate the question?
> Now the PHP prototype for ldap_modify looks like this:
> bool ldap_modify ( resource link_identifier, string dn, array entry)
> So let's say I want to increment a uidNumber value in
> $dn="cn=proxyuser,dc=example,dc=com". According to the docs I need to
> make an array as follows:
[much code and documentation elided]
Again, not sure what was asked. But, from a real quick look at the PHP
documentation for their LDAP functions, I'm not sure their API is powerful
enough to accomplish what we've been saying (issuing a pointed delete and
add (or replace)) in one function call. Might be better asked on a PHP
mailing list... I'm not a bigtime PHP coder.
While the observation isn't too helpful I'm sure, it's fairly easy to
accomplish with an API like Perl's Net::LDAP.
Alan Sparks, UNIX/Linux Systems Administrator <email@example.com>