in reply to Re: Net::LDAP issues...
in thread Net::LDAP issues...

I added
$search->code && die $search->error;
after:
$search = $ldap->search( base=> "$base", filter=>"mail=$name_email" );
I got the same error but with "code" instead of "count:
Can't call method "code" without a package or object reference at c:\PROGRA~1\APACHE~1\apache\cgi-bin\PROCES~2.PL line 126

Thanks,
but it didn't fix it.
chrisj

Replies are listed 'Best First'.
Re: Re: Re: Net::LDAP issues...
by sgifford (Prior) on May 10, 2004 at 23:58 UTC
    Hrm. Three more thoughts. First, try printing out $search right after you call $ldap->search; that should tell you what type of object Perl thinks it is. Net::LDAP's search method is supposed to return a Net::LDAP::Search object. You might also want to make sure you have use Net::LDAP::Search at the top of your script; I'm not sure if Perl handles this automatically. Finally, make sure you check for an error after the bind method, since if that's failing it could explain why your other calls are failing.