Re: Issue adding LDAP Entry - Could not add entry LDAP_NAMING_VIOLATION

From: Date: Sun, 14 Apr 2013 22:28:41 +0000
Subject: Re: Issue adding LDAP Entry - Could not add entry LDAP_NAMING_VIOLATION
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-31769@lists.php.net to get a copy of this message
Did it. The key was to put objectClass, user. 2013/4/14 Agus <agus.262@gmail.com> > This is what i did. FIrst I got different error so i added attribute > objectClass: person which gave me this error. > > this is the code. the ldap object was created earlier: > > $addEntry = new LdapManage(); > $addEntry->setDn('cn=Test,dc=corp,dc=test,dc=com'); > $attribs = array( > 'objectClass' =>'person', > 'cn' =>'Test', > 'mail' =>Test@test.com', > ); > $addEntry->setAttribs($attribs); > $entry = $addEntry->createEntry(); > //lets add entry > $return = $ldap->add($entry); > > if(PEAR::isError($return)){ > die('Cant add entry: '.$return->getMessage()); > } > > > i get the LDAP_errors mentioned. Seems like it isn't as simple as the > example in the manual. Any hint would be appreciated. > > Thanks >

« previous php.pear.general (#31769) next »