Dont want display Warning: ldap_bind() but my own error message
Posted on 2010-01-05
I hope i is simple one for some of you who know it :).
I am trying to bind to ad using php ldap manual, problem is that when the ldap_bind() failes it throws a warning message even if I say somthing like
$bd = ldap_bind($ad,$username,$password)
or die("couldn't bind to ad");
It would give the Warning: ldap_bind() [function.ldap-bind]: Unable to bind to server: Invalid credentials in..
before the message i have types.
All I am after is that how to not display the warning message and do the action I have set it to.