Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7764231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:51:29+00:00 2026-06-01T14:51:29+00:00

We use an LDAP server to authenticate our users. Because the server is accessed

  • 0

We use an LDAP server to authenticate our users. Because the server is accessed remotely, there’s a rather high plausibility that our webserver will be online, and the LDAP server will be down for maintenance.

Right now, when ldap_bind fails, I assume it is a user authentication issue (wrong username/pass) and I display a message to the user. However, if the connection to the LDAP server is failing (and it’s not necessarily a credentials problem) then I end up with hundreds of users telling me that their password isn’t working when that isn’t the problem.

How can I recover from this? ldap_connect seems to succeed in all cases, as the connection is deferred until ldap_bind is called. The return value from ldap_bind is a simple boolean, and while the warning message displayed by PHP is informative, that doesn’t help my code out too much.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T14:51:31+00:00Added an answer on June 1, 2026 at 2:51 pm

    Use ldap_errno().

    http://php.net/manual/en/function.ldap-errno.php

    List of possible error codes: http://www.php.net/manual/en/function.ldap-errno.php#20665

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an SVN server, and I'd like to use our LDAP server for
I'm trying to connect to an existing LDAP server to authenticate users trying to
I am trying to use python to query LDAP server, and it always returns
Our project uses an LDAP repository for storing users. In production this will be
We have our own web server hosting our website that is open to the
My overall goal is to let users of my Rails app authenticate against our
I have an ASP.NET application that authenticates users using Ldap against active directory. This
i'm tring to use ldap for authentication in Weblogic Server but I have this
I'm trying to use ldaptor to connect via startTLS to a LDAP server. Searching
I have a web form that uses AD to authenticate users. I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.