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

From: Date: Tue, 10 Oct 2000 05:30:37 +0000
Subject: Re: PHP 4.0 Bug #7099: ldap_add() under OpenLDAP 2.0.4+
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-34543@lists.php.net to get a copy of this message
hi, i'm having the same kind of problem. when i installed openldap 2.0.6 i could add entries directly (command prompt).also the ldapsearch was working fine. after that i tired to add entries through php-4.0.1pl2 and after that i cant search entries any more. ldap search returns -------------------------------------------------- version: 2 # # filter: objectclass=* # requesting: ALL # # search result search: 2 result: 32 No such object # numResponses: 1 -------------------------------------------------------- although i can add entries through ldapadd now. is it something to do with php4. thanks. Parvez lanewala. Musicurry And Then malmond@vt.edu wrote ............. > From: malmond@vt.edu > Operating system: Linux > PHP version: 4.0.2 > PHP Bug Type: Unknown/Other Function > Bug description: ldap_add() under OpenLDAP 2.0.4+ > > 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" > > > -- > Edit Bug report at: http://bugs.php.net/?id=7099&edit=1 > > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.dev (#34543) next »