[turba] Re: Suggestion for sizelimit

Andrew Morgan morgan at orst.edu
Wed Aug 13 13:21:14 PDT 2003



On Wed, 13 Aug 2003, Claudio Santana wrote:

>   The current code in CVS is this one:
>
>          /* Send the query to the LDAP server and fetch the matching
> entries. */
>          if (!($res = @ldap_search($this->ds, $this->root, $filter,
> $attr, 0, $sizelimit))) {
>              $this->errno = ldap_errno($this->ds);
>              $this->errstr = ldap_error($this->ds);
>              return PEAR::raiseError($this->errstr);
>          }
>
>          return $this->getResults($fields, $res);
>
>
> It actually rises the Pear error, but is still not taking care of the
> user's notification that he is just receiving a partial result. In the
> other hand, at this point I am not pretty sure if this validation is
> possible, in the PHP documentation of the errors list for ldapsearch
> function, the error code that I think corresponds to this error is:
>
> // Not used in LDAPv3
> LDAP_PARTIAL_RESULTS           0x09
>
>
> But it has that comment on top of it that says it is not used in LDAPv3.
> And the RFC 2251 published on Dec 1997 for LDAPv3 says that the result
> code 9 is now reserved (http://www.ietf.org/rfc/rfc2251.txt). So, my
> next question would be is there a reliable way of finding out that you
> receive just the parcial result of a given query because of the
> sizelimit parameter in the latest LDAP versions? Any suggestions or
> comments?
>
> Claudio Santana.

Test for the error code:

LDAP SIZELIMIT EXCEEDED         0x04    4

You'll get this error message plus the first sizelimit results back.

I'm working right now on coding up the warning message for Stable Turba.
I'll post a patch here when I get it working.

	Andy



More information about the turba mailing list