I've found a good solution I think.

On Thu, Jan 04, 2001 at 09:13:01PM +0100, Oyvind Moll wrote:
> * Andi Gutmans <[EMAIL PROTECTED]>
> |
> | 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.

I've made ldap_search() (list and read also) capable of parallel
searches by passing an array of link identifiers. In that case it
always returns an array of the same size as the link array where
each entry is the result entry if we got an entry from the server,
else it's FALSE.

So, for normal searches, we get the behavior we want from
ldap_search() by doing ldap_search(array($ds), ...

For more info on how it works, see the mail I sent on parallel
ldap_search() a couple of days ago.

Stig

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to