The Server Pages
:: TSP Menu
- Home
- Authors
- Glossary
- RSS Feed

:: Servers
- CPanel
- Hosting
- Linux
- Windows

:: Webmaster
- Databases
- Design
- Search Engines

:: Scripts
- Scripts

:: Documentation
- PHP Manual

:: Other
- Errors & Solutions
- TechPunt
- Wojjie

search for in the

ldap_read> <ldap_parse_reference
[edit] Last updated: Sat, 12 May 2012

view this page in


(PHP 4 >= 4.0.5, PHP 5)

ldap_parse_resultExtract information from result


bool ldap_parse_result ( resource $link , resource $result , int &$errcode [, string &$matcheddn [, string &$errmsg [, array &$referrals ]]] )

This function is currently not documented; only its argument list is available.

add a note add a note User Contributed Notes ldap_parse_result
Christoph Rosse 29-Mar-2011 01:26
I made some debugging to find out what this function really does.
= 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 php basically passes all parameters to this function and returns the same things.

show source | credits | sitemap | contact | advertising | mirror sites