Learn how to a build a cloud-first strategyRegister Now


Dont want display Warning: ldap_bind() but my own error message

Posted on 2010-01-05
Medium Priority
Last Modified: 2013-12-13
hi all,
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.

Question by:SameerMirza
  • 2

Accepted Solution

SameerMirza earned 0 total points
ID: 26179780
I am getting good... It pretty simple
Some one give the ponts!!
//Disable error messages

Expert Comment

ID: 26180137
error_reporting('E_ALL & ~E_WARNING');

Author Comment

ID: 26180171
how about winding them all up as I posted above

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses
Course of the Month20 days, 19 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question