ldap_add(): Add: Object class violation error

前端 未结 1 1705
無奈伤痛
無奈伤痛 2020-12-18 10:13

When I try to add attribute to the OpenDS via PHP I get the following error:

ldap_add(): Add: Object class violation

Please help

相关标签:
1条回答
  • 2020-12-18 10:26

    Hmm, it looks like You are trying only to set objectclass to inetOrgPerson, but You have to set also other upper classes from which inetorgPerson is extending - that would be top and person maybe...

    So:

    $ldaprecord['cn'] = "roshan1";
    $ldaprecord['givenName'] = "mkljl";
    $ldaprecord['sn'] = "roshan";
    $ldaprecord['objectclass'][0] = "top";
    $ldaprecord['objectclass'][1] = "person";
    $ldaprecord['objectclass'][2] = "inetOrgPerson";
    $ldaprecord['mail'] = "lkl@fh.com";
    $ldaprecord['mmmm'] = "77878";
    
    0 讨论(0)
提交回复
热议问题