PHP 4.0 Bug #7099 Updated: ldap_add() under OpenLDAP 2.0.4+

From: Date: Thu, 12 Oct 2000 15:05:35 +0000
Subject: PHP 4.0 Bug #7099 Updated: ldap_add() under OpenLDAP 2.0.4+
Groups: php.dev 
Request: Send a blank email to php-dev+get-34803@lists.php.net to get a copy of this message
ID: 7099 Updated by: sniper Reported By: malmond@vt.edu Status: Closed Bug Type: Unknown/Other Function Assigned To: Comments: User reported problem solved. --Jani Previous Comments: --------------------------------------------------------------------------- [2000-10-09 10:44:31] malmond@vt.edu I have been using OpenLDAP 1.2.11 for awhile and could add records to the LDAP from PHP; upon switching into full production I can no longer add records (now using OpenLDAP 2.0.4). I have recompiled PHP 4.0.2 with OL 2.0.4 and added to ld.so.conf the new path for the libs (ran ldconfig). I can not add to LDAP. There are no problems with my schema or objectclasses; if I write the info to file I can ldapadd from the command line no problem. I believe that it may have something to do with simple authentication that is sometimes needed for OpenLDAP root (admin) account. If I reinstall PHP, update ld.so.conf, this time pointing to OpenLDAP 1.2.11; the code works just fine in adding the record. Code for both is as follows (code is abbreviated for this example): $entry is the array of attributes $dn the LDAP distinquished name (DN) $ldap_link = ldap_connect("localhost"); if($ldap_link) { if(ldap_bind($ldap_link, "uid=root,o=myorg,c=us","secretpassword")) { if(ldap_add($ldap_link,$dn,$entry)) { print "it worked"; } else { print "did not work"; } } } The script will always die on the ldap_add line: stating "LDAP: add operation could not be completed" --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=7099

« previous php.dev (#34803) next »