ldapsearch returns results, ldap_search() does not.
Posted: Fri Jul 06, 2012 1:16 pm
When running an ldapsearch command on the command line, it returns tons of results, whereas an equivalent (or so I think) query via PHP returns nothing.
ldapsearch command:
PHP search:
What am I missing?
ldapsearch command:
Code: Select all
ldapsearch -Zx -H ldap://directory.host.ca -D [CREDENTIALS] -w [PASSWORD] -z 0 -l 0 - LLL -b "ou=people,dc=business,dc=ca" "(&(facultyCode=AU)(term=1380)" uidCode: Select all
//binding has already happened with the same credentials as used in the CLI command
$filter = '(&(facultyCode=AU)(term="1380"))';
$list = ldap_search($conn,'ou=people,dc=business,dc=ca',$filter,array('uid'),0,0,0);