[PHP-DEV] Need just a little help getting this LDAP addition going From: Bob Silva (bob_silva <email protected>)
Date: 03/04/99

I've tried to add the function: ldap_sort_entries to ldap.c but something is not working with the strcmp. The function partially works, just not correctly.

If the ldap result returns:

sn = Landon
sn = Bob
sn = Zeev
sn = Rasmus
sn = Andi
sn = Rick
sn = Colin

when it sorts, it will return:

sn = Landon
sn = Rasmus
sn = Rick
sn = Zeev

Andi, Bob and Colin are dropped, it will properly sort the entries that are (greater than) the first entry returned, which in this case was sn = Landon.
Another Example: same list of people but sn = Zeev is the first

Output: sn = Zeev

So it is accessing and modifying the ldap_result that php has stored in its internal list, so I am kinda lost from here.
It would be great if someone that actually knows what they are doing can make it work for the good of the people.

Thanks if you decide you can look at it. I've attached the php3_ldap.h and ldap.c files with my mods, just look in
ldap.c for php3_ldap_sort_entries on line 744.

Bob Silva

P.S. - I really did try and make this work, so Im not just copping out and asking someone else to do it.

  • application/octet-stream attachment: ldap.c

--
PHP Development Mailing List   http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe <email protected>
For help: php-dev-help <email protected>