I'm using iPlanet Directory Server 5.0, Perl LDAP 1.4.1, C SDK 5.0, and
Solaris 7. I've written a small Perl program to search the directory. It
connects to it fine, sends the search, and the program behaves as though it
received no results. When I look at the directory sever's access log, I see
the successful connection, and a successful search with entries returned.
Has anyone else seen this problem or have any suggestions. I am new to
LDAP. Below is the program:
use Mozilla::LDAP::Conn;
use Mozilla::LDAP::Utils;
$conn = new Mozilla::LDAP::Conn("host",port,"bind DN","password") || die
"Cannot connect: $!";
$base = "o=myorg";
$filter = "objectclass=*";
$scope = "subtree";
$entry = $conn->search($base, $scope, $filter);
if (!$entry)
{
print "Search failed. Try again\n";
}
else
{
while ($entry)
{
$entry->printLDIF();
$entry = $conn->nextEntry();
}
}
$conn->close if $conn;