[Date Prev][Date Next] [Chronological] [Thread] [Top]

ldap_search on integer



Hi everybody

I work with OpenLdap2.1 with Sleepycat Software: Berkeley DB 4.0.14 on a
Suse 8.1 and with PHP 4.2.2.
I want to do a search in php on an integer attribute named
LocalAttacheLoges (sorry it's in french)

My attribute is declared liked this

attributetype (1.3.6.1.4.1.5720.1.5
 NAME 'LocalAttacheLoges'
 DESC 'Nombre d attache  logees'
 EQUALITY integerMatch
 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27)

When i restart my ldap server there is no problem.

My request is like this in PHP

$racine = "ou=Locaux,c=fr";
$filter = "(LocalAttacheLoges>=3)";
$sr = ldap_search($gbl_idServeurLDAP, "$racine","$filter");

Il get no results with this request and my log is

Jul 25 09:06:40 srvLdap slapd[6520]: daemon: conn=38 fd=9 connection from
IP=137.X.Y.Z:1836 (IP=0.0.0.0:389) accepted.
Jul 25 09:06:40 srvLdap slapd[6541]: conn=38 op=0 SRCH base
="ou=Locaux,c=fr" scope=2 filter="(?=undefined)"
Jul 25 09:06:40 srvLdap slapd[6552]: conn=38 op=1 UNBIND
Jul 25 09:06:40 srvLdap slapd[6541]: conn=38 op=0 SEARCH RESULT tag=101
err=0 nentries=0 text=
Jul 25 09:06:40 srvLdap slapd[6541]: conn=38 fd=9 closed


But if my filter is "(LocalAttacheLoges=3)" i get 19 results

Jul 25 09:09:28 srvLdap slapd[6520]: daemon: conn=37 fd=9 connection from
IP=137.X.Y.Z:1837 (IP=0.0.0.0:389) accepted.
Jul 25 09:09:28 srvLdap slapd[6553]: conn=37 op=0 SRCH base
="ou=Locaux,c=fr" scope=2 filter="(LocalAttacheLoges=3)"
Jul 25 09:09:28 srvLdap slapd[6554]: conn=37 op=1 UNBIND
Jul 25 09:09:28 srvLdap slapd[6553]: conn=37 op=0 SEARCH RESULT tag=101
err=0 nentries=19 text=
Jul 25 09:09:28 srvLdap slapd[6553]: conn=37 fd=9 closed


When i have a request with a greater or equal than the filter does not
appear in my log
but with an equality strict there is no problem.

Can you help me ?

Thank you

Mathieu





...



...