Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having trouble getting the php ldap extension running on my web server, which is running 2008 R2.

Install Notes

  1. Apache: httpd-2.2.16-win32-x86-no_ssl.msi
  2. PHP : VC6 x86 Thread Safe (2010-Jul-21 20:06:17) (ZIP)
  3. adLDAP.php

Steps I've taken

  1. Made sure php_ldap.dll is in C:\PHP\ext (I had to get this from
  2. Made sure libeay32.dll and ssleay32.dll are in C:\PHP
  3. C:\PHP has been added to PATH
  4. extension=php_ldap.dll is uncommented in php.ini
  5. extension_dir is set to C:\PHP\ext in php.ini
  6. ran a phpinfo(); the correct php.ini is being loaded, but ldap is not initialized

I'm really at a loss for what might be happening, when I try and use the extension I get the following error (expected since it didn't load):

exception 'adLDAPException' with message 'No LDAP support for PHP. See:' in C:\Website\hmis\adLDAP.php:338 Stack trace: #0 C:\Website\hmis\login.php(10): adLDAP->__construct() #1 C:\Website\hmis\index.php(2): require_once('C:\Website\hmis...') #2 {main}

Does anyone have any advice on what might be going wrong? Thanks.

Edit: So it seems like php_ldap.dll is missing from 5.3.3 VC6 builds, I got my copy from a 5.3.1 VC6 build. Could that be causing issues? I'm using apache so I can't use the official VC9 PHP builds, should I try to use ApacheLounge builds? I don't think it should be necessary because I got LDAP working with the official builds for 5.3.1

Edit 2: So the other thing I've tried is completely removing the php_ldap.dll from C:\PHP\ext . I get the exact same error as before, and apache doesn't crash as I would expect it to. Shouldn't it not be able to start with a missing extension?

share|improve this question
up vote 1 down vote accepted

I had a similar issue on a 2008 box. My problem turned out to be a result of incorrect dll's. Probably worth making sure they are from the thread-safe version. Hope this helps.

share|improve this answer
Hi, thanks for the response, I've made sure I have the 5.3.3 dll and I"m still running into the same problem – The_Denominater Aug 30 '10 at 15:00
Never mind that, you were right, at first I was using the 5.3.1 version, then I upgraded to the 5.3.3 nts version. Now I am using the 5.3.3 ts version and it works! – The_Denominater Aug 30 '10 at 15:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.