Hi,
I'm having a problem creating an OU entry on a Open LDAP Server. I'm using the code below.
$ad = ldap_connect("ldap://srvldap");
ldap_set_option($ad, LDAP_OPT_PROTOCOL_VERSION, 3);
$bd = ldap_bind($ad,"CN=Admin,DC=subdomain,DC=domain,DC= com","secret");
$newou["objectClass"][0] = "top";
$newou["objectClass"][1] = "organizationalUnit";
$newou["ou"] = "myou";
$sync = ldap_add($ad,"OU=teste,OU=HPA,OU=Utilizadores,DC=s ubdomain,DC=domain,DC=com",$newou);
Then i'm getting a warning message:
Warning: ldap_add() [function.ldap-add]: Add: Undefined attribute type in /var/www/project/ou_insert.php on line 85 -Corresponds to ($sync = ldap_add($ad,"OU=teste,OU=HPA,OU=Utilizadores,DC=s ubdomain,DC=domain,DC=com",$ newou));
Can u tell me what i'm doing wrong?
Thanks for your help people.
Regards,
Bruno Marinho
--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-