Re: things I don't like with ldap_search()

From: Date: Fri, 05 Jan 2001 10:14:30 +0000
Subject: Re: things I don't like with ldap_search()
References: 1 2 3  Groups: php.dev 
Request: Send a blank email to php-dev+get-43026@lists.php.net to get a copy of this message
On Thu, Jan 04, 2001 at 09:13:01PM +0100, Oyvind Moll wrote: > * Andi Gutmans <andi@zend.com> > | > | Stig Venaas: > | > > | >So, I want ldap_search() to return a result identifier more often than > | >it currently does, personally I would like it to always return a result > | >identifier unless ldap_search_s() returns -1. Then PHP applications can > | >always get all the information about what happened, and get all error > | >messages, result codes, referrals etc. from the results. > | > | I think it's a problem changing the API of LDAP in a way which will break > | other people's scripts. > > Doing a change such as this in a minor version upgrade: yes, I agree. > It's not something people should be confronted with going from 4.0.4 > to 4.0.5. > > However, I think the current behaviour of ldap_search() is > inconsistent enough that it eventually could and should be changed, > and not by adding another optional parameter. What I would like to do now then is to add support for two results that can only happen with LDAPv3, that is adminlimit exceeded which should be treated like sizelimit exceeded (LDAPv2 would return sizelimit exceeded in that case) and referrals. The referrals case will only occur when the script first does ldap_set_option($ds, LDAP_OPT_REFERRALS, 0); to specifically tell the library not to follow referrals on it's own. This change should be safe. I'm planning to do this change soon, and also add a function that the script can use to look at the referrals and other messages from server. This is also just for LDAPv3, but many people are starting to use LDAPv3 now. Stig

« previous php.dev (#43026) next »