RE: [PHP-DEV] PHP 4.0 Bug #5433 Updated: LDAP "Decoding error" wh en requesting non-existent attributes in a search op.
| From: | Jani Taskinen | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | RE: [PHP-DEV] PHP 4.0 Bug #5433 Updated: LDAP "Decoding error" wh en requesting non-existent attributes in a search op. | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-25928@lists.php.net to get a copy of this message | ||
On Tue, 25 Jul 2000, Johan Troedsson wrote:
>> But for the dn-case: add an fifth parameter to ldap_read() / ldap_search()
>> / ldap_list()
>> Like this: $sr = ldap_search($ds, $dn, $filter, array(), 1);
>>
>> This will get only the attributes types + dn. Maybe this is what you
>> really wanted ? ;)
>>
> Yes. But what role does the requested attributes array play here? Is
>it so that when the fifth=1 then all the attribute names will be fetched +
>the values for the attributes matching an attribute name in the array? Just
>curious.
0 = both attributes types + values fetched
1 = only attributes types.
And dn is included with value, of course.
This is documented in CVS. I don't know how often the online manual
is updated from those XML-files. For your convinience, here's short
description:
int ldap_search (int link_identifier, string base_dn, string filter
[,array attributes [, intattrsonly [, int sizelimit [, int timelimit [, int deref]]]]])
These parameters apply to ldap_read() and ldap_list() also.
Sorry about alignment..I'm in a hurry now! =)
<-- cut from manual (CVS) -->
The fifth parameter attrsonly should be set to 1 if only attribute types
are wanted. If set to 0
both attributes types and attribute values are fetched which is the
default behaviour.
With the sixth parameter sizelimit it is possible to limit the count of
entries fetched. Setting
this to 0 means no limit. NOTE: This parameter can NOT override
server-side preset sizelimit. You
can set it lower though.
The seventh parameter timelimit sets the number of seconds how long is
spend on the search.
Setting this to 0 means no limit. NOTE: This parameter can NOT override
server-side preset
timelimit. You can set it lower though.
The eigth parameter deref specifies how aliases should be handled
during the search. It can be one
of the following:
* LDAP_DEREF_NEVER - (default) aliases are never dereferenced.
* LDAP_DEREF_SEARCHING - aliases should be dereferenced during the
search but not when locating
the base object of the search.
* LDAP_DEREF_FINDING - aliases should be dereferenced when locating
the base object but not
during the search.
* LDAP_DEREF_ALWAYS - aliases should be dereferenced always.
<-- CUT -->
--Jani