473,398 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

ldap_set_option

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
Jan 2 '07 #1
0 1114

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: User79 | last post by:
Hello! I'm trying simple scripts to browse an Active Directory via LDAP functions... My domain is: schoollm.lan The script I'm trying: ---------- $root_dn = "administrator@mascheroni.lan";...
0
by: Florian Racky | last post by:
Hi, I'm trying to get secure authentication with Novell EDirectory running. PHP Version is 4.3.1 compiled with ldap and openssl. I copied the Novell root-certificate into the OpenSSL...
0
by: Luca Bighi | last post by:
I try to use ldap-star-tls to connect to a win2003 domain controller and browse AD. $ds = ldap_connect("ldap://$ad_server/") ,"389"); // Connect to an LDAP server echo $debug?"<BR>LDAP...
15
by: Bonegavel | last post by:
Going to sound strange, but here i go. We use Windows 2000 AD for everything. However, we are also running XAMPP (basically Apache, MySQL, PHP for windows) on a Windows box for our Intranet. I...
0
by: scoomey | last post by:
Note: I'm cross-posting the below to nyphp.org as well. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I've been struggling with an issue for a few months. I am attempting to search...
0
by: andyt_2000_uk | last post by:
Hi guys, I can currently connect, bind and authenticate a user against ActiveDirectory using OpenLdap and apache. I have apache compiled with SSL as well. I force PHP to use https:// and i get...
0
by: bisi | last post by:
Hello I am using php5 and trying to add users to the AD with the following php-script, but it doesnt work. Login,... works fine but I get an error: "ldap_add() : Add: Referral in...
1
by: sbettadpur | last post by:
hello i have problem with connecting to LDAP.... it means i have user created on server(192.168.0.35), if i try using user called srinath this type error i am receiving..........show below...
1
by: theS70RM | last post by:
Hi, I have a php script to retrieve data about a user from the active directory using ldap. Here's a cut down version: $domainName = "domain.com"; $serverName = "server";...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.