Hello, Derek
[snip]
>However I decided to include another objectclass (uidObject) and now it
>returns with:
> error - Object class violation
> error number - 65
>
[snip]
>
>$ds=ldap_connect("localhost");
>if ($ds) {
> $r=ldap_bind($ds, "cn=admin,dc=domain,dc=com","mypassword");
> $rdn = "o=$username,ou=suppliers,ou=customers,dc=domain,dc=com";
>
> $info["userPassword"]="$password";
> $info["o"]="$organisation";
> $info["uid"]="$username";
> $info["objectclass"]="organization";
> $info["objectclass"]="uidObject";
>
[snip]
There is a mistake in your code with the way you are trying to provide multiple
values for the objectclass attribute.
Your code first assigns "organization" to the objectclass, then replaces this by
assigning "uidObject" to the same variable.
I think what you need is
$info["objectclass"][0]="organization";
$info["objectclass"][1]="uidObject";
This is the way you assign multiple values to an attribute.
I suspect that from the error message you were getting your LDAP server was
doing schema checking and probably the rules were not allowing an entry that was
missing the objectclass "organization".
Regards
Nick Talbott
IT Policy and Strategy Manager, Powys County Council, UK
email [EMAIL PROTECTED]
FAX +44 (0) 1597 824781
web http://www.powys.gov.uk and http://www.powysweb.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]