note 103172 added to function.ldap-parse-result
| From: | ChristophRosse at osu1 dot php dot net | Date: | Tue, 29 Mar 2011 21:26:59 +0000 |
| Subject: | note 103172 added to function.ldap-parse-result | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-178328@lists.php.net to get a copy of this message | ||
I made some debugging to find out what this function really does.
<?php
$sr = ldap_search($ldapconn, $searchDn, 'objectclass=*');
$return = ldap_parse_result($ldapconn, $sr, $errcode, $matcheddn, $errormsg, $ldapreferrals);
var_dump($return); // bool(true)
var_dump($errcode); // int(0)
var_dump($matcheddn); // string(0) ""
var_dump($errormsg); // string(0) ""
var_dump($ldapreferrals);// array(0) {}
?>
If the searchresult is not valid everything will be NULL.
If this function for some reason cant parse the valid result an E_Warning will be thrown and $return
will be false and $errcode, $errmsg will be filled with the ldap errorcode and ldap errorstring.
until now I was not able to create a valid search result that was not parse-able.
If your search-result contains ldap_referrals they will be listend in the $ldapreferrals array.
I have no Idea when the $matcheddn param gets filled.
For more detailed information look at C function http://linux.die.net/man/3/ldap_parse_result
php basically passes all parameters to this function and returns the same things.
----
Server IP: 212.69.189.114
Probable Submitter: 84.112.179.80
----
Manual Page -- http://www.php.net/manual/en/function.ldap-parse-result.php
Edit -- https://master.php.net/note/edit/103172
Del: integrated -- https://master.php.net/note/delete/103172/integrated
Del: useless -- https://master.php.net/note/delete/103172/useless
Del: bad code -- https://master.php.net/note/delete/103172/bad+code
Del: spam -- https://master.php.net/note/delete/103172/spam
Del: non-english -- https://master.php.net/note/delete/103172/non-english
Del: in docs -- https://master.php.net/note/delete/103172/in+docs
Del: other reasons-- https://master.php.net/note/delete/103172
Reject -- https://master.php.net/note/reject/103172
Search -- https://master.php.net/manage/user-notes.php