ethanthekiwi's picture

I would like to integrate my organizations WordPress 3.0.1 intranet site with our Active Directory server, so users can log in to comment in WordPress and post in the forum (bbpress which is already integrated with WordPress) without having to create a second account. I installed the Active Directory Integration plugin, but it gave me this error: "ATTENTION: You have no LDAP support. This plugin won´t work." This was a bit vague for me so I tried a different plugin, Simple LDAP Login. It gave me this error:

Plugin could not be activated because it triggered a fatal error.

Fatal error: Uncaught exception 'adLDAPException' with message 'No LDAP support for PHP. See:' in /var/www/wordpress/wp-content/plugins/simple-ldap-login/adLDAP.php:338 Stack trace: #0 /var/www/wordpress/wp-content/plugins/simple-ldap-login/Simple-LDAP-Login.php(60): adLDAP->__construct(Array) #1 /var/www/wordpress/wp-admin/plugins.php(158): include('/var/www/wordpr...') #2 /var/www/wordpress/wp-admin/plugins.php(160): plugin_sandbox_scrape('simple-ldap-log...') #3 {main} thrown in /var/www/wordpress/wp-content/plugins/simple-ldap-login/adLDAP.php on line 338

I began to sense a pattern so I started doing some reading on LDAP and PHP. From what I understood, I need to enable LDAP in my PHP installation. I believe that means I need to install or update something on the Turnkey Linux WordPress application side of things, but I am not sure how to do that. I found instructions for doing this on a Windows server, but could not find anything similar for Turnkey.

Let me know if you need anymore info about my system.

Adrian Moya's picture

Try installing php5-ldap package and restarting apache.

apt-get install php5-ldap

That should add ldap support to php. But I'm just guessing 

ethanthekiwi's picture

That worked, thank you very much. (and good guess)

Here is what I did for anyone with the same problem:

I went into webmin for the Turnkey Linux appliance. From the tools menu I selected Command Shell and then ran the apt-ge install php5-ldap command and it installed php5-ldap. Then I went to Servers - Apache webservers and clicked stop apache then start apache. This of course took the site down for all of a few seconds. Then I went into WordPress, clicked activate on the Simple LDAP plugin and it was working. 

Adrian Moya's picture

Glad to help!

AARONDAS's picture



I thought you might be able to help me.  I installed AD intigration, and it works fine if I am loged in as admin, but when I log out, and then try and login again I am unable to login as admin only as a subscriber.  Do you know of a fix?





ethanthekiwi's picture

Are you talking about logging in to WordPress or bbPres? If it is WordPress then I don't have any ideas. bbPress on the other hand will  not let you get to the admin panel unless you log in using local (non AD) credentials. 

AARONDAS's picture

Hi Ethan,


It completly locked me out, so what I wound up doing is removing my database and doing a fresh install, and then importing my content back in.  It took me about a day to do this eitire process.  The problem was that I had ad integration installed and I had it set up for groups, and I guess it wasn't authenticating.  the result was that it would not allow anyone even the admin into wordpress.





ethanthekiwi's picture

No Problem

Lepide's picture

OpenLDAP’s proxy service can allow LDAP operations to cross the boundaries between AD and OpenLDAP deployments. To demonstrate this proxy service, we walk through the steps to make AD’s cn=Users container, which by default contains all user objects, part of an OpenLDAP directory. To produce the examples in this article, I used CentOS 4.3, OpenLDAP 2.2.13, and AD running on Windows Server 2003 R2. Later in the article, I’ll show you a limitation in the commonly deployed OpenLDAP 2.2, which you can solve by installing OpenLDAP 2.3 on CentOS 4.3.

Ben Rice's picture

tried running        apt-get install php5-ldap

I'm getting  this "E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem."

Is there an update on the command to add ldap support for php?

Ben Rice's picture

WHen I read my own post I fixed my problem...

Ran 'dpkg --configure -a'



Sharon Serguta's picture

Does this mean we can set up integration without using a plugin?  Or do I still need the plugin?  Thanks.'s picture

You still still need a plugin.


You would need:

  • Directory Server
  • Wordpress Plugin for LDAP 
  • Wordpress
  • PHP with LDAP installed
Olas Rakoto's picture

Hi everybody,

Is it possible to re-compile turnkey's openldap ? 

I need to use ldap-passtrough which require ldap compiled with --enable-spasswd and --with-cyrus-sasl.

How can I do that ?


Jeremy Davis's picture

So I suggest that you should be able to add the Debian source repository and use that to recompile in the way that you want/need. I don't have a ton of experience with that stuff; so I suggest that you do a bit of googling. FWIW TKL v14.x = Debian Jessie.
Lau's picture

it's fake?

I think that it's not possible. 

Are you used Active directory and Apache server (Linux) with Wordpress?

The client machine authenticate on Apache with active directory credentials?



Jeremy Davis's picture

Active Directory provides LDAP authentication and WordPress can support LDAP so totally legit...
TravisT's picture

I have the Joomla applicance installed and ready to go.  I want to add AD for my organization.  What needs to be configured on the linux side to make this work?  I have ldap and authnz_ldap installed.  Is there a basic how-to for this?

Jeremy Davis's picture

I'm not familiar with Joomla, but AFAIK it's possible. I imagine that there are some settings you'd need to adjust in Joomla, although perhaps you need to install a specific Joomla extension?

I just did a quick google for "joomla ad authentication" and it returned tons of results that look pretty relevant.

If you manage to get it working perhaps you could post back with a tutorial to make it easier for future users?

Good luck

Add new comment