[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
PHP 4.1.2 && err=50 (no write access to parent)
- To: openldap-software@OpenLDAP.org
- Subject: PHP 4.1.2 && err=50 (no write access to parent)
- From: Turbo Fredriksson <turbo@bayour.com>
- Date: 13 Dec 2002 11:39:54 +0100
- Organization: LDAP/Kerberos expert wannabe
- User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7
I've taken over the maintainence of phpQLAdmin, and are trying to
improve on it...
I authenticate as my own RDN which have full access to the db. From the
shell everything goes ok, but not from PHP (no write access to parent).
---- LDIF ----
dn: dc=test,dc=com
objectClass: top
objectClass: domain
dc: test
---- LDIF ----
----- shell command ----
[papadoc.pts/14]$ alias ldapadd
bash: alias: `ldapadd' not found
[papadoc.pts/14]$ ldapadd -h localhost -x -D 'UID=TURBO,OU=PEOPLE,DC=FREDRIKSSON,DC=COM' -W -f /tmp/test2.ldif
Enter LDAP Password:
adding new entry "dc=test,dc=com"
----- shell command ----
----- PHP DEBUG SNIPPET -----
----- DEBUG: pql_add_domain() ---
dn: dc=test,dc=com
objectClass: top
objectClass: domain
dc: test
LDAP-Error: Insufficient access
----- PHP DEBUG SNIPPET -----
---- PHP CODE SNIPPET ----
function pql_add_domain($ldap_linkid, $ldap_basedn, $domain){
// adds a domain into ldap-tree (ou|dc-record)
$entry["objectClass"][] = "top";
$entry["objectClass"][] = PQL_LDAP_OBJECTCLASS_DOMAIN;
$entry[PQL_LDAP_ATTR_DOMAIN] = $domain;
$dn = PQL_LDAP_ATTR_DOMAIN . "=" . $domain . "," . $ldap_basedn;
// --------------------------
// DEBUG mode: Print the LDIF
echo "<br>--- DEBUG: pql_add_domain() ---<br>";
echo "dn: $dn<br>";
foreach($entry as $key => $e) {
if(eregi("objectclass", $key)) {
// We have a objectClass
if(is_array($entry[$key])) {
// ... in an array. Go through each one, creating the LDAP entry
foreach($entry[$key] as $oc) {
echo "$key: $oc<br>";
}
}
} else {
echo "$key: $entry[$key]<br>";
}
}
// die("--- DEBUG ---");
// --------------------------
if(! @ldap_add($ldap_linkid, $dn, $entry)) {
pql_errormsg($ldap_linkid);
die();
return false;
}
---- PHP CODE SNIPPET ----
Anyone got an idea?