Problem with LDAP

From: Date: Wed, 31 Oct 2001 09:44:14 +0000
Subject: Problem with LDAP
Groups: php.general 
Request: Send a blank email to php-general+get-72993@lists.php.net to get a copy of this message
I have a problem with php (4.0.6) and ldap (openldap sever 2.0.11): When I use this .ldif file from shell I can enter this value without problem: ------ dn: cn=pippo, dc=example, dc=it uid: pippo cn: pippo sn: pippo objectclass: person objectclass: account objectclass: posixAccount objectclass: top userpassword: {crypt}$1$a0811139$/xUzQIdsvChM1.mhBZx6j/ loginshell: /bin/bash uidnumber: 505 gidnumber: 505 homedirectory: /home/pippo ------ but when I use this php script: ------ [...] $ldap_bind = ldap_bind ($ldap_conn, $ldap_manager_dn, $ldap_password); $info ["objectClass"] = "person"; #ok $info ["uid"] = "pippo"; $info ["cn"] = "pippo"; #ok $info ["sn"] = "pippo"; #ok $info ["objectClass"] = "person"; $info ["objectClass"] = "account"; $info ["objectClass"] = "posixAccount"; $info ["objectClass"] = "top"; $info ["userPassword"] = "{crypt}$1$a0811139$/xUzQIdsvChM1.mhBZx6j/"; $info ["loginShell"] = "/bin/bash"; $info ["uidNumber"] = "505"; $info ["gidNumber"] = "505"; $info ["homeDirectory"] = "/home/pippo"; $ldap_bind = ldap_add ($ldap_conn, "cn=pippo, dc=example, dc=it", $info); ldap_close ($ldap_conn); [...] ------ I obtain tha following error message (in /var/log/httpd/error.log): ------ LDAP: Object class violation additional info: attribute not allowed ------ Note that if I use only entries tagged with the comment on the right the add is done... Why? Can anyone help me please? Thanx, tode [ tode@senzarete.it ]

« previous php.general (#72993) next »