On Wed, Oct 30, 2002 at 09:28:00AM -0500, GC wrote:
> Hi, using php_ldapadd, I get this error in ldap.log:
> 
> Oct 30 09:23:43 Lunar slapd[10714]: conn=202 op=1 RESULT tag=105 err=65
> text=object class 'posixAccount' requires attribute 'uidNumber'
> 
> How do I get the next available uid number from my ldap database and then
> use that number for uidnumber?

This is a classic LDAP problem. If you have server side sorting you can
ask for uidNumber in sorted order, and set sizelimit to 1. Not all
servers support it though, and it's not easy to specify this in PHP.
Another possibility might be to remember last max, and only search for
larger values (of course you could search for all). Finally if you can
control how data is updated, you could have a special attribute in a
special object containing the highest uid, and update that whenever
you add a higher one.

Stig

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to