1--TEST-- 2ldap_search() test 3--CREDITS-- 4Davide Mendolia <idaf1er@gmail.com> 5Patrick Allaert <patrickallaert@php.net> 6Belgian PHP Testfest 2009 7--SKIPIF-- 8<?php 9require_once('skipif.inc'); 10require_once('skipifbindfailure.inc'); 11?> 12--FILE-- 13<?php 14include "connect.inc"; 15 16$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); 17insert_dummy_data($link, $base); 18 19$dn = "$base"; 20$filter = "(objectclass=person)"; 21var_dump( 22 $result = ldap_search($link, $dn, $filter, array('sn'), 1, 1, 3), 23 ldap_get_entries($link, $result) 24); 25?> 26===DONE=== 27--CLEAN-- 28<?php 29include "connect.inc"; 30 31$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); 32remove_dummy_data($link, $base); 33?> 34--EXPECTF-- 35Warning: ldap_search(): Partial search results returned: Sizelimit exceeded in %s on line %d 36resource(%d) of type (ldap result) 37array(2) { 38 ["count"]=> 39 int(1) 40 [0]=> 41 array(4) { 42 ["sn"]=> 43 array(1) { 44 ["count"]=> 45 int(0) 46 } 47 [0]=> 48 string(2) "sn" 49 ["count"]=> 50 int(1) 51 ["dn"]=> 52 string(%d) "cn=userA,%s" 53 } 54} 55===DONE=== 56