PHP 4.0 Bug #6764 Updated: ldap_search warning message
| From: | sniper@php.net | Date: | Wed, 01 Nov 2000 01:04:45 +0000 |
| Subject: | PHP 4.0 Bug #6764 Updated: ldap_search warning message | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-36567@lists.php.net to get a copy of this message | ||
ID: 6764
Updated by: sniper
Reported By: perceau@eram.fr
Status: Closed
Bug Type: LDAP related
Assigned To:
Comments:
User feedback:
-------------
after searching about the problem, it appear that query on the mail field are not supported by the
Novell Groupwise LDAP's implementation.
Previous Comments:
---------------------------------------------------------------------------
[2000-10-29 00:18:21] sniper@php.net
No feedback.
---------------------------------------------------------------------------
[2000-10-12 08:18:04] sniper@php.net
Try adding this line right after ldap_Search() line:
echo ldap_error($ds);
And report back what the output of it is.
--Jani
---------------------------------------------------------------------------
[2000-09-18 05:56:16] sniper@php.net
User feedback:
--------------
i haven't tried it with Netscape, but have done it with Outlook : it worked fine..
--------------
1. Do not send HTML-emails.
2. Please use this web-interface for replying to bug report queries.
3. I can not reproduce this.
Are you sure this is correct:
$sr=ldap_search($ds,"O=ERAM", "mail=*");
Is that second argument like it should be??
--Jani
---------------------------------------------------------------------------
[2000-09-14 22:39:47] sniper@php.net
Does the same query work for example using netscape?
--Jani
---------------------------------------------------------------------------
[2000-09-14 17:40:24] perceau@eram.fr
Here's the PHP script generating the error :
<?php
echo "<h3>LDAP query test</h3>";
echo "Connecting ...";
$ds=ldap_connect("nwgwia01"); // must be a valid LDAP server!
echo "connect result is ".$ds."<p>";
if ($ds) {
$r=ldap_bind($ds); // this is an "anonymous" bind, typically
// read-only access
echo "Bind result is ".$r."<p>";
// Search surname entry
$sr=ldap_search($ds,"O=ERAM", "mail=*");
echo "Search result is ".$sr."<p>";
echo "Number of entires returned is
".ldap_count_entries($ds,$sr)."<p>";
echo "Getting entries ...<p>";
$info = ldap_get_entries($ds, $sr);
$T->get_array_elems($info);
echo "Closing connection";
ldap_close($ds);
} else {
echo "<h4>Unable to connect to LDAP server</h4>";
}
?>
The LDAP Server is a Novell Groupwise 5.5 system.
The ldap_search command work fine if search on "sn=" or "givenname=".
BUT it generate the following warning message when used with "mail=..."
Warning: LDAP: Unabel to perform the search: Erreur d'operation in <php_script> line 14.
Ideas ?
---------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view the rest of the comments,
please view the bug report online.
Full Bug description available at: http://bugs.php.net/?id=6764