On Tue, Nov 27, 2001 at 04:08:39PM +0200, Christos Sintoris wrote:
> Does anybody know how to call ldap_set_option in order to use server side
> sorting?
> using:
> $sortval="{'cn', 0,1}";
> $ctrl1 = array("oid" => "1.2.840.113556.1.4.473", "value" =>$sortval);
> ldap_set_option($ds, LDAP_OPT_SERVER_CONTROLS, array($ctrl1));
> reports success, but ldap_get_option() returns nothing and a subsequend
> ldap_search
> returns protocol error. I use LDAP V3 (iPlanet).

I think perhaps the control would have to be given as part of the
search (which is not possible in PHP right now).  Support for this
might be added if several people find it useful.  Why do you want
server side sorting?  How about sorting it on the client side?
Next PHP release (in CVS now) will have a function ldap_sort()
that helps you do it on the client.  After the search, you can
simply do ldap_sort($ds, $sr, "cn"); if you want to search on cn.


PHP General 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