You are here: ldap_set_option « PHP Programming Language « IT news, forums, messages
ldap_set_option

Posted by Dirk Laurenz on 01/02/07 18:59

Hi,

i want to extend somescripts for getting data from an ldap server.
i want to setup server side sorting with ldap_set_option, but i don't
know how to correctly define how to sort for example using any attribute.

i tried this code:

$arr1 = array("oid" => "1.2.840.113556.1.4.473", "iscritical" => false,
value" => "uid");
ldap_set_option($ld, LDAP_OPT_SERVER_CONTROLS, array($arr1));

The ldap server accepts it and supports serverside sorting. But i get a
ldap error.

what works, (code i found)

$arr1 = array("oid" => "1.2.840.113556.1.4.473", "iscritical" => false,
value" => "\x30\x84\x00\x00\x00\x0a\x30\x84\x00\x00\x00\x04\x04\x02cn");
ldap_set_option($ld, LDAP_OPT_SERVER_CONTROLS, array($arr1));

this works fine (for attr "cn")

trying "\x30\x84\x00\x00\x00\x0a\x30\x84\x00\x00\x00\x04\x04\x02uid"
doesn't work.

what am i doing wrong?

Dirk

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация