#27794 [Opn->Bgs]: LDAP extensions not working correctly
| From: | iliaa@php.net | Date: | Wed, 31 Mar 2004 17:07:30 +0000 |
| Subject: | #27794 [Opn->Bgs]: LDAP extensions not working correctly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-57241@lists.php.net to get a copy of this message | ||
ID: 27794
Updated by: iliaa@php.net
Reported By: robert_thompson at ml dot com
-Status: Open
+Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Win2000
PHP Version: 4.3.5
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2004-03-31 06:28:54] 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 05:42:58] 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.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27794&edit=1