|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45045 Not all users able to login
Submitted: 2008-05-20 06:54 UTC Modified: 2008-07-22 01:00 UTC
From: nedrafehi at gmail dot com Assigned:
Status: No Feedback Package: LDAP related
PHP Version: 5.2.6 OS: Vista/Server 2003
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-05-20 06:54 UTC] nedrafehi at gmail dot com
When using LDAP to authenticate ActiveDirectory users hosted on Windows Server 2003 I get some issues connecting with all users.

Reproduce code:
global $ad_opts;

   $auth = ldap_connect($serverAddress)
   	or die("Could not connect to LDAP server.");

   ldap_set_option($auth, LDAP_OPT_PROTOCOL_VERSION, 3);
   ldap_set_option($auth, LDAP_OPT_REFERRALS, 0);

   $login = ldap_bind($auth, $u, $p);

   if(!$login) {
      return 0;

   return 1;


Expected result:
I expect the function to return 1 if the correct user credentials have been supplied.

Actual result:
While this works for most users, there have been a few users I've had trouble authenticating. Even though the username/password are correct, it fails. The strange thing is, users in the same 'directory' as the user are authenticated through LDAP. Also, this user has no trouble actually logging into the Windows network so I have no idea why this may be happening.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-14 18:27 UTC]
Check your ldap server logs for possible errors.
 [2008-07-22 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 12 11:01:32 2024 UTC