This is code from a working script to add a user account to a Novell NDS
database via Novell's LDAPv3.
Hope this helps.
//connect to LDAP
$ds=ldap_connect("172.17.20.10"); // must be a valid LDAP server!
if (!$ds) {
echo "Connection to LDAP server failed<br><br>";
exit();
}
//bind to LDAP
$r=ldap_bind($ds,"cn=ftpadmin, ou=Corp, o=PMX", "engineer");
if (!$r) {
echo "LDAP bind failed<br><br>";
exit();
}
//prepare the data to be added
$info1["cn"]=$login;
$info1["sn"]=$login;
$info1["objectclass"]="inetOrgPerson";
// add data to directory
$r=ldap_add($ds, "cn=$login, ou=SomeOU, o=Org", $info1);
//Close the LDAP connection.
ldap_close($ds);
""Richard Lynch"" <[EMAIL PROTECTED]> wrote in message
02c401c09a4c$98a7ce20$[EMAIL PROTECTED]">news:02c401c09a4c$98a7ce20$[EMAIL PROTECTED]...
> > $a=ldap_add($ds, "uid=beau, dc=graduate, dc=com", $info);
> > but it's an error
> > Waring LDAP: add operation could not be complete in. <my php file>
>
> I don't know much about LDAP:
>
> Have you checked that $ds is a valid LDAP connection?
> Can you get your own record out of LDAP using it?
> Presumably LDAP has some notion of who can add records (or whatever they
> called them) and who can't.
> Are you sure the user connected in ldap_open() is empowered to add records
> at that level in the LDAP space?
>
> --
> Visit the Zend Store at http://www.zend.com/store/
> Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
>
>
>
> --
> 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]
>
--
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]