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.
//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);
What am I missing?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
The CLI isn't using PHP at all. It's a direct OpenLDAP executable. The person that's helping me with this is using raw command line calls - I'm just trying to get my PHP code to give me the same results.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Thanks for that, but it doesn't really apply to me. I'm not getting an error. I'm getting a successful search result - just with zero records. If I change my filter to ask for, say, all users - I get expected results. I'm fairly certain my problem is that my filter - as seen by the ldap server - is different between the PHP call, and the raw ldapsearch CLI command.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.