LDAP_SEARCH got error

Problems with the Windows version of XAMPP, questions, comments, and anything related.

LDAP_SEARCH got error

Postby OXODesign » 29. March 2006 20:24

Hello, I trying LDAP from XAMPP but I got a error when I use the function LDAP_SEARCH.

The error I got is:
Warning: ldap_search() [function.ldap-search]: Search: Operations error in C:\Program Files\xampp\htdocs\test.php on line 10


Here is the code I use:
Code: Select all
<?php
$connect = ldap_connect("localhost");
$set = ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3);
echo $set;

$dn = "o=MyCompany, c=com";
$filter="(|(sn=f*)(givenname=mav*))";
$justthese = array("ou", "sn", "givenname", "mail");

$sr=ldap_search($connect, $dn, $filter, $justthese);

$info = ldap_get_entries($connect, $sr);

echo $info["count"]." entries returned\n";

?>


In this case I most get all surname with "f" or all givenname with mav.

To Connect and BIND it's working fine, the problem is to search in AD, cold someone make a small exampel with LDAP_SEARCH and posted here.

I have a Windows 2003 SERVER (AD).

Thanx for help for last time, and I hope someone can help me again.
OXODesign
 
Posts: 3
Joined: 24. March 2006 14:58

Postby Wiedmann » 29. March 2006 22:27

You have read the user contributed notes for that function?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby OXODesign » 30. March 2006 16:10

Wiedmann wrote:You have read the user contributed notes for that function?
What do you mean with that? I'm not so good in English! Do you mean this: http://no.php.net/ldap_search ?
OXODesign
 
Posts: 3
Joined: 24. March 2006 14:58

Postby Wiedmann » 30. March 2006 16:14

Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 37 guests