From: Kent P. <kpe...@ev...> - 2002-06-12 18:51:15
|
I am attempting to use perl-ldap (both 0.25 and 0.251) to search and display the results. I working with perl 5.005_03 on a Solaris 8 box and perl 5.6.1, Activestate build 631 on a Win2K machine. First, here is my code: #!/usr/bin/perl -w use Net::LDAP; use Net::LDAP::LDIF; my $server="idev.dobson.net"; my $port="18251"; my $binddn="uid=admin,ou=Administrators,ou=TopologyManagement,o=NetscapeRoot"; my $passwd="admin"; my $basedn="o=dobson.net"; my $scope="sub"; my $c = Net::LDAP->new($server, port => $port) or die "Unable to connect to $server: $@\n"; $c->bind ($binddn, password => $passwd) or die "Unable to bind: $@\n"; if ($binddn eq "" && $passwd eq "") { print "Successful anonymous bind.\n"; } else { print "Successful bind as $binddn.\n"; } my $searchobj = $c->search(base => $basedn, scope => $scope, filter => $ARGV[0]); die "Bad search, errorcode #".$searchobj->code() if $searchobj->code( ); # process the return values from search ( ) if ($searchobj) { my $ldif = new Net::LDAP::LDIF("-"); $ldif->write($searchobj->entries( )); $ldif->done( ); } $c->unbind( ); print "Done\n" On the Solaris box and the Win2K machine I get pretty much the same error. On the Win2K machine I get: Successful bind as uid=admin,ou=Administrators,ou=TopologyManagement,o=NetscapeRoot. Use of uninitialized value in substitution (s///) at c:/Perl/site/lib/Net/LDAP/Filter.pm line 165. Use of uninitialized value in substitution (s///) at c:/Perl/site/lib/Net/LDAP/Filter.pm line 165. Bad search, errorcode #89 at ldap.pl line 27. on the Solaris box I get: Successful bind as uid=admin,ou=Administrators,ou=TopologyManagement,o=NetscapeRoot. Use of uninitialized value at /usr/perl5/site_perl/5.005/Net/LDAP/Filter.pm line 165. Use of uninitialized value at /usr/perl5/site_perl/5.005/Net/LDAP/Filter.pm line 165. Bad search, errorcode #89 at ldap.pl line 27. Is this a problem with my code or is it a problem with Net::LDAP? Please, please help me out... Kent |