[KLUG Members] LDAP & PHP

Adam Williams members@kalamazoolinux.org
04 Aug 2003 19:54:06 -0400


> Unless it has been changed since the last time I worked with it, 
> PHP-LDAP does not contain proper management for concurrent write access. 

"concurrent write access"?  LDAP is not a RDBMS, there are no
transactions.  A modify, delete, or add operation is atomic - LDAP
offers nothing beyond that. 

The modify notation itself contains some protection against redundant
write operations - ldapmodify requires an attribute name, previous
value, and new value (for example) - thus if the previous value has
changed the write will fail - and all modifiers in the write operation
will fail.

> Because of this, I feel that Perl is a much better choice of languages 
> for working with LDAP despite the fact that I really like PHP better 
> generally speaking.

Perl, PHP, what-not,... all link against liblber & libldap (assuming you
have openldap installed).  None of them (AFAIveSeen) do anything but
wrap the underlying C api.

The *ideal* language for LDAP manipulation is probably python - it has
the most maintained and widely used (other than C) API.

With Novell buying Ximian we can hope that Mono's C# implementation will
get grown up LDAP support soon.

> >I want to write the auth myself. I don't want to use htaccess.
> >I want users to login so I have their information. Not neccisarily for
> >security.