Home > Uncategorized > WPMU Ldap 2.8.4 Released

WPMU Ldap 2.8.4 Released

The latest version of the WPMU Ldap plugin is now available for download.  This is a minor bugfix release, and also includes revamped back end code to use the new authenticate hook instead of the old method of overwriting the wp_authenticate function.  It should also correct some of the odd issues that surfaced from 2.8.2.

This release will completely break any remote chance of compatibility with version older than 2.8.  If you are still running an older version, this is a great reason to upgrade!

The plugin can be download from the Sourceforge project page.  As always, I hope you enjoy it and please report any problems or suggestions you might have!

Categories: Uncategorized Tags:
  1. September 4th, 2009 at 12:40 | #1

    I get the following error when i try to activate the plug-in?:

    Fatal error: Cannot redeclare wp_new_user_notification() (previously declared in D:\wamp\www\WordPress\wp-includes\pluggable.php:1144) in D:\wamp\www\WordPress\wp-content\plugins\wpmu-ldap_2.8.4\ldap\lib\wpmu_ldap_admin.functions.php on line 677

  2. September 10th, 2009 at 12:04 | #3

    Glad to see the recent development on this project! I hope I can help too. I just got an error: Fatal error: Call to undefined function wpmuldaptestconnection() in C:\websites\wordpress-mu\wp-content\mu-plugins\ldap\lib\wpmu_ldap_admin.functions.php on line 67

    This occurred after I input my connection settings, selected ‘test connection settings’, and clicked save.

    I found that the function referenced was in wpmu_ldap.functions.php, so I tried adding this to the top of wpmu_ldap_admin.functions.php:

    include(‘wpmu_ldap.functions.php’);

    but then the page would just hang forever. i don’t know if that’s because it’s taking a long time to search ldap or what. i let it go for awhile but it was just hanging.

    thanks for any advice you can offer.

    best regards,
    Jim

  3. September 10th, 2009 at 12:25 | #4

    Whoa! Spoke too soon. That heppens if you forgot to uncomment ‘extension=php_ldap.dll’ in the php.ini. my bad. new server – didn’t realize it wasn’t switched on.

  4. Scott Lockwood
    September 15th, 2009 at 11:51 | #5

    @Doug Walker
    I get a similar error, on Debian:

    Fatal error: Cannot redeclare wp_new_user_notification() (previously declared in /var/www/wp-includes/pluggable.php:1144) in /var/www/wp-content/plugins/ldap/lib/wpmu_ldap_admin.functions.php on line 677

  5. Scott Lockwood
    September 15th, 2009 at 12:03 | #7

    Thanks, that is now fixed.

  6. September 16th, 2009 at 12:31 | #8

    I have the plugin installed and the test seems to work on the plugin admin page but I cant authenticate against my ldap server. I cant login or do anything else. I am running the latest version of the plugin and the latest version of the server under os x server 10.5.8.

    • September 16th, 2009 at 23:16 | #9

      Are you trying to connect over ldaps or tls? If so – my guess would be you might be running int a cert issues. Make sure your ldap server cert is trusted by the php install wpmu is running from. Do connections to the ldap server work from other apps – such as an ldap browser – using the same credentials you are trying to use with wpmu?

  7. Srujan Das
    September 18th, 2009 at 01:28 | #10

    Hi,
    I am having a real hard time with this plugin 🙁

    I have put in mu-plugins folder and gave the following credential in connection settings.

    LDAP Authentication: Enabled
    Server Encryption: None
    Server Address: IP address of one of the servers
    Server Port: 389 (I am working on a Debian machine and I am trying to authenticate users against windows active directory)
    Search DN: DC=ad,DC=DomainName=,DC=com
    Search User DN: my active directory user name
    Search User Passwd: my passwd
    LDAP type: windows
    Test Connection: Yes

    And I got this
    Fatal error: Call to undefined function wpmuldaptestconnection() in /var/www/wordpress-mu/wp-content/mu-plugins/ldap/lib/wpmu_ldap_admin.functions.php

    Then i have added the following lines

    // method to test the LDAP connection
    require_once(“ldap/lib/wpmu_ldap.functions.php”);

    the beginning of the wpmu_ldap_admin.functions.php file

    my test results say “Test Failed”. Can anyone help me out?

  8. September 18th, 2009 at 06:49 | #11

    @Srujan Das

    This plugin was designed to work from mu-plugins – and no where else.

    The user name will need to be the full dn (cn=user,dc=ad,dc=domain,dc=com). You may also want to try port 3268.

    The test function should be in the wpmu_admin_functions – that will be fixed in a future release.

  9. September 18th, 2009 at 17:26 | #12

    Excellent Plugin.

    I am not able to run this SSL. I see debug messages in the source PhP file. How do I turn on debugging?. I added define(‘WP_DEBUG’, true); to wp-config.php. This still does not give me dubug information for this plugin.

    Thanks
    Harish

  10. Srujan Das
    September 22nd, 2009 at 03:05 | #13

    @Aaron Axelsen

    Hi Aron,
    Thanks a ton. It worked (partially).

    I have given the following Connection Settings

    LDAP Authentication: Enabled
    Server Encryption: None
    Server Address: IP address of the server
    Server Port: 389 (I am working on a Debian machine and I am trying to authenticate users against windows active directory)
    Search DN: DC=ad,DC=DomainName=,DC=com
    Search User DN: cn=user,dc=ad,dc=domain,dc=com
    Search User Passwd:
    LDAP type: windows
    Test Connection: Yes

    and the connection test was successful. But I am unable to login from the login page 🙁

    I tried giving my username, username@domain.com and username@ad.domain.com as usernames and my password. None of them worked.

    My General settings are as follows:

    Use Single Sign-On? No
    Auto-Create WPMU Accounts? Yes
    Auto-Create WPMU Blogs? Yes
    Create local users? No
    Allow blog admins to bulk add? No
    Disable Public Signup? Yes
    Public Display Name Format: username
    New user email notification (Local Users): No
    New user email notification (LDAP Users): No

    Then I tried to add users manually (for testing). It said it couldn’t find the given user name and asked for email address. when i gave the email address, a local user with email_id as user_name is created. Even that user is unable to log in.

  11. Srujan Das
    September 23rd, 2009 at 08:23 | #14

    When I tried to add users manually I am getting the following error:

    user_name not found in LDAP directory. To create a local user, enter the users email:

    But when i give username as user_name@ad.domain.com in Connection Settings along with password I am able to test the connection successfully.

    Please help me out, I am stuck with this for the past 4 days 🙁

  12. September 28th, 2009 at 06:57 | #16

    @Harish Chakravarthy
    There is not a good debug system currently – however the problem is most likely that the server running wpmu does not trust the ca cert from the AD/ldap server. You can try turning on server debug in ldap/lib/wpmu_ldap.functions.php – change $server->DebugOff() to $server->DebugOn();

  13. September 28th, 2009 at 10:45 | #17

    @James Revillini

    That was an extremely helpful tidbit – thanks!

  14. Srujan Das
    October 6th, 2009 at 02:59 | #18

    I tried it. It says TEST FAILED. Connection testing is being successful only for user_name@ad.domain.com. Even then when I try to login with user_name@ad.domain.com from the login page, it is saying error: incorrect user_name/password.

  15. Douglas Noble
    October 6th, 2009 at 02:59 | #20

    Hi, thanks for the continuing work on this plugin and sorry if this is not the correct place to post this.

    Are there any plans to add support for multiple search dn’s to be entered. We have a setup where we have one ou=staff and one ou=students -it looks as though php’s ldap_search function supports an array of search dn’s from 4.0.5. Currently I am searching the whole domain so I can include staff and students and apparently this has the potential to cause unnecessary stress on the server.

    We are currently using drupal as the cms for our intranet – since the IT department know that both wordpress and drupal are written in php and drupal’s ldap plugin supports multiple search dns and so I am being asked the question!

    If this is not on the roadmap I will try to implement it myself.

    Thanks for any help.

    • October 6th, 2009 at 06:44 | #21

      This is not currently on my roadmap – but it sounds like a good feature. If you take a stab at this, please do send a patch and I’ll gladly include it in the plugin. Otherwise, I’ll add it to the list (feel free to add as a feature request on the SF project as well).

  16. Douglas Noble
    October 6th, 2009 at 03:12 | #22

    On a separate note – I am using this plugin on an installation of wordpressmμ 2.8.4a with wpmu ldap 2.8.4 and Buddypress 1.1. I am getting the following warning on all non admin pages on the site – I have tried multiple themes and it seems to happen in them all:
    `Warning: Cannot modify header information – headers already sent by (output started at …) in … /wp-includes/pluggable.php on line 865`

    The warning goes away when the ldap plugin is disabled. I thought that there may be some trailing whitespace after a php closing tag somewhere but can’t seem to find it. Has anyone else had this issue?

    • October 6th, 2009 at 06:57 | #23

      I have not seen this – and don’t remember hearing out it from others. I have done a little work with wpmu + ldap + buddypress and its worked for me. Feel free to add as a bug on SF and I’ll investigate as time permits.

  17. Srujan Das
    October 7th, 2009 at 08:02 | #24

    @Aaron Axelsen
    Hi Alex,

    I am able to test the connection. My problem is I am unable to login. I have turned on the Debugging. And I got the following error message.

    Warning: ldap_search() [function.ldap-search]: Search: Operations error in /var/www/wp-content/mu-plugins/ldap/lib/ldap_core.php on line 153

    Warning: ldap_get_entries(): supplied argument is not a valid ldap result resource in /var/www/wp-content/mu-plugins/ldap/lib/ldap_core.php on line 154

    • October 11th, 2009 at 14:00 | #25

      If the connection test is successful – this is odd. The username is not an email address or username@domain format – its simply the username.

  18. October 9th, 2009 at 09:53 | #26

    Nice updates. I’ve integrated my changes so that users can use a single group in Active Directory. If you’d like to have it as a branch on sourceforge, let me know….

  19. Dessie Lunsford
    October 13th, 2009 at 12:14 | #27

    Is there any documentation on enabling SSO with the module? I see that it has an option to use it in the “LDAP Options” page and that “Windows Authentication” needs to be activated in the “wp-login.php” file, but I’m not sure what to modify in the file.

    How do I activate it?

    Thanks

  20. Dessie Lunsford
    October 20th, 2009 at 16:02 | #28

    Still hoping for an answer on this – thanks.

  21. Mark
    October 22nd, 2009 at 10:28 | #30

    Tried to integrate wpmu-ldap 2.8.4 with wpmu 2.8.4a and all I ever get on the login page is a red box that says ERROR: Unknown error in LDAP Authentication. The connection test always fails, but I can do anonymous ldap searches from command line using ldapsearch -h ldap.gsa.gov etc.

    any ideas?

  22. Mark
    October 23rd, 2009 at 11:55 | #31

    @Mark
    PROBLEM SOLVED

    Our ldap does not seem to like the connection string found in ldap_core.php so I changed these lines:

    ############FROM
    if ($this->debug) {
    #$this->connection_handle = ldap_connect ($proto.$this->server, $this->port);
    $this->connection_handle = ldap_connect ($proto.$this->server.’:’.$this->port);
    } else {
    #$this->connection_handle = @ldap_connect ($proto.$this->server, $this->port);
    $this->connection_handle = @ldap_connect ($proto.$this->server.’:’.$this->port);
    #############TO
    if ($this->debug) {
    #$this->connection_handle = ldap_connect ($this->server, $this->port);
    $this->connection_handle = ldap_connect ($this->server.’:’.$this->port);
    } else {
    #$this->connection_handle = @ldap_connect ($this->server, $this->port);
    $this->connection_handle = @ldap_connect ($this->server.’:’.$this->port);

    After that the connection test worked and users can now login.

  23. Mark
    October 23rd, 2009 at 11:56 | #32

    @Mark

    Just to clarify, I just deleted $proto. from the connection strings.

  24. October 24th, 2009 at 13:51 | #33

    @Mark
    What ldap security settings and port settings where you using?

  25. Ajdin
    October 29th, 2009 at 10:36 | #34

    I get LDAP Connection Test: Successful! message when testing but users cannot login. I’m using the same username/password to login as set in LDAP Options. I’m using TikiWiki with LDAP and that works fine. No PHP errors in error log, server log nothing as well. DebugOn() is set but still no output. Show PHP error is off in php ini but log errors is on. Running Linux AD on Windows.

  26. Dessie Lunsford
    October 29th, 2009 at 14:06 | #35

    Aaron Axelsen :Currently the only documentation for this is in the code itself.

    Sorry to be daft on this, but what documentation? I didnt see anything in the “code” for how to “activate windows authentication”…just a message that it needed to be.

  27. Ajdin
    October 30th, 2009 at 05:14 | #36

    @Ajdin
    I’ve wrongly set LDAP Type to Linux instead of Windows. What a ****head 🙂

  28. Ajdin
    October 30th, 2009 at 05:21 | #37

    Ajdin :I get LDAP Connection Test: Successful! message when testing but users cannot login. I’m using the same username/password to login as set in LDAP Options. I’m using TikiWiki with LDAP and that works fine. No PHP errors in error log, server log nothing as well. DebugOn() is set but still no output. Show PHP error is off in php ini but log errors is on. Running Linux AD on Windows.

    I wrongly set LDAP Type to Linux instead of Windows but also had to make some changes to Attributes. CDould not find equivalent to Mac Address in my attrib list but that didn’t seam to matter. From Linux you can use this command to check attribs (ldap on windows requires authentication)
    ldapsearch -h your.ldap.server.com -D “CN=Firstname Surname (username),OU=Something1,DC=Somethin2,DC=Something3,DC=Something4” -x -W -A -b “CN=Firstname Surname (username),OU=Something1,DC=Somethin2,DC=Something3,DC=Something4” > somefile.txt

  29. Chris K
    November 17th, 2009 at 08:16 | #38

    As always: THANKS! Awesome plugin. We would not be able to run WPMU without this plugin. I was planning to upgrade to 2.8 right before Thanksgiving and saw you already have everything in place to make it work.

  30. Nicole
    November 24th, 2009 at 11:15 | #39

    I’m having the same issue as Ajdin, only I know I’m on the windows platform. The test connection works fine, but users are still unable to login. I have 1 user who’s account is set to LDAP authentication, but he’s only able to log in with an old ‘local’ password. I have set the debug to on, but am seeing no error messages.

    I am not a developer, (I’m a designer) so any help you can give me in relatively easy tech-speak would be much appreciated!

  31. November 25th, 2009 at 11:00 | #40

    @Nicole
    It sounds like you may have converted an existing install to ldap, is that correct? If so, the user in question needs the meta value updated to pull from ldap, has that been set? (Should be an option on the user profile page)

    If they are new users, is the plugin configured to auto create users from ldap?

  32. Mark
    November 25th, 2009 at 11:44 | #41

    @Aaron Axelsen
    LDAP-Authentcation: enabled
    server encryption: None
    Server address: x.x.x.x
    server port 389
    search dn: [blank]
    search user dn: [blank]
    search user password: [blank]
    ldap type Linux (actually IBM Lotus Notes)
    Test connection (yes or no)
    ====
    search attribute: mail

  33. Nicole
    December 2nd, 2009 at 09:50 | #42

    @Aaron Axelsen

    Hi Aaron!

    Yes exactly. We added the LDAP plugin into an existing WPMU installation after the fact. The user in question does have LDAP set as his authentication, but it doesn’t validate unless he uses his old password from his local user settings. Also, this person is an Admin (if that makes a difference?)

    We have LDAP authentication enabled on site wide, and have turned on the ‘auto create WMPU accounts’. Because of the latest issue where LDAP isn’t working, I have also had to turn on ‘create local users’ because otherwise it locks me out too.

    Since sending the initial message, I’ve done some digging and noted that someone else had an issue where the authentication used a different Search DN or User DN than the users were on. Example: The account I am using to connect with (and verify the LDAP) is a non-expiring Service Account (OU=Service Accounts), but the users are all using expiring user accounts (OU=Users). Could this in fact be my issue? Do I need to use a user account and not a service account?

    Thanks again for all your help and hard work! 🙂

    – Nicole

  34. December 3rd, 2009 at 07:42 | #43

    @Nicole
    Service accounts vs user accounts should not matter – as long as the account is able to login to the directory you should be fine. Make sure you have the full DN specified for the account though (CN=wpmubind,OU=binds,DC=example,DC=com). Also make sure you have the right search attribute for your directory set.

  35. December 10th, 2009 at 13:43 | #44

    @Aaron Axelsen

    Great plugin – really saved a tonne of time on our MU installation, using Active Directory; many thanks.

    We’d love to try out SSO as well – I can’t understand the reference to “Windows Authentication” needs to be activated in the “wp-login.php” – there’s no reference to this in wp-login.php .

    Is it a complex piece of custom coding that is required, rather than a simple ‘switch’ to enable somewhere in wp-login.php?

    cheers!

  36. January 20th, 2010 at 17:14 | #45

    I have the plugin installed and woking. Every time i try and use the bulk add feature i get a generic “Error” message. Any suggestions?

  1. No trackbacks yet.