php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27794 LDAP extensions not working correctly
Submitted: 2004-03-31 05:42 UTC Modified: 2004-03-31 12:07 UTC
From: robert_thompson at ml dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.3.5 OS: Win2000
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: robert_thompson at ml dot com
New email:
PHP Version: OS:

 

 [2004-03-31 05:42 UTC] robert_thompson at ml dot com
Description:
------------
I have tried for two days every possibility to get a simple LDAP query to return anything. I have copied and tried some 50 different scripts. I can't get anything to come back.

Reproduce code:
---------------
$ldaphost="myserver"; 
$ldapport=389;       

$ldapconn=ldap_connect($ldaphost, $ldapport);

$bind=ldap_bind($ldapconn);
echo "Bind result is ".$r." -- blank is good<p>";

$dn="OU=Support,dc=win,dc=com";

$filter="(|(sn=a*)(givenname=a*))";
$justthese = array( "ou", "sn", "givenname", "mail");

$result=ldap_search($ldapconn, $dn, $filter, $justthese);
echo ldap_error($result);


Expected result:
----------------
Anything

Actual result:
--------------
I get nothing back.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-31 06:28 UTC] robert_thompson at ml dot com
I fought this for days only to figure out that it is because someone in our company set LDAP so that you can not query without binding with supplied credentials. Anonymous binding would not work for reporting - yet you could bind successfully anonymously - wierd.
 [2004-03-31 12:07 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

User indicates the problem is the result of local 
misconfiguration. 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Sep 19 16:01:27 2024 UTC