WordPress.org

Forums

Active Directory SSO
I cannot activate the plugin at all (7 posts)

  1. Shonu
    Member
    Posted 1 year ago #

    I am trying to reach the settings after activation, after all other plugins disabled, and I get this:

    Warning: ldap_bind() [function.ldap-bind]: Unable to bind to server: Can't contact LDAP server in D:\My Apps\_Standalone\WAMP\htdocs\wordpress_1\wp-content\plugins\_active-directory-sso\ad-sso-user.php on line 31

    Warning: ldap_search() [function.ldap-search]: Search: Can't contact LDAP server in D:\My Apps\_Standalone\WAMP\htdocs\wordpress_1\wp-content\plugins\_active-directory-sso\ad-sso-user.php on line 34

    Warning: ldap_get_entries() expects parameter 2 to be resource, boolean given in D:\My Apps\_Standalone\WAMP\htdocs\wordpress_1\wp-content\plugins\_active-directory-sso\ad-sso-user.php on line 36

    Warning: Cannot modify header information - headers already sent by (output started at D:\My Apps\_Standalone\WAMP\htdocs\wordpress_1\wp-content\plugins\_active-directory-sso\ad-sso-user.php:31) in D:\My Apps\_Standalone\WAMP\htdocs\wordpress_1\wp-includes\pluggable.php on line 678

    Warning: Cannot modify header information - headers already sent by (output started at D:\My Apps\_Standalone\WAMP\htdocs\wordpress_1\wp-content\plugins\_active-directory-sso\ad-sso-user.php:31) in D:\My Apps\_Standalone\WAMP\htdocs\wordpress_1\wp-includes\pluggable.php on line 679

    Warning: Cannot modify header information - headers already sent by (output started at D:\My Apps\_Standalone\WAMP\htdocs\wordpress_1\wp-content\plugins\_active-directory-sso\ad-sso-user.php:31) in D:\My Apps\_Standalone\WAMP\htdocs\wordpress_1\wp-includes\pluggable.php on line 680

    Warning: Cannot modify header information - headers already sent by (output started at D:\My Apps\_Standalone\WAMP\htdocs\wordpress_1\wp-content\plugins\_active-directory-sso\ad-sso-user.php:31) in D:\My Apps\_Standalone\WAMP\htdocs\wordpress_1\wp-includes\pluggable.php on line 896

    https://wordpress.org/plugins/active-directory-sso/

  2. Shonu
    Member
    Posted 1 year ago #

    Fix for
    active-directory-sso\ad-sso.php
    Line 31ff:

    @$bind = ldap_bind($connection, $ldapCred, $ad_sso_password);
     if(!$bind){
       return;
     }

    The issue is that as soon as the plugin is activated, it tries to contact a ldap, which it won't find before configuration - dead-lock!

  3. honyczek
    Member
    Posted 1 year ago #

    I can't use it on 3.9.1, IIS 7.5. If I enable the plugin, it returns to plugin list and after it I can't do anything. The blank page appears.

    After applying fix from Shonu it's the same.

  4. roko1
    Member
    Posted 1 year ago #

    Just started working on implementation of this plug-in, but unfortunately this plug-in isn't really working OK by default, it requires a lot of editing.

    First off, the Shonu-fix should be implemented, but this has to be done on ad-sso-user.php, and not in ad-sso.php

    Second, line 22 is like this:
    $ldapCred = $ad_sso_username . '@' . $ad_sso_fqdn;

    Should be like this (otherwise the $ad_sso_domain variable isn't even used):
    $ldapCred = $ad_sso_username . '@' . $ad_sso_domain;

    Sometimes you can get away with this if the FQDN is the same as domain, but in my case it wasn't, so the script didn't bind at all.

    Also, there are a lot of deprecated function calls, so this should be looked into in the future (dunno if the dev still works on this plug-in)

    To be continued?

  5. roko1
    Member
    Posted 1 year ago #

    Concerning $ad_sso_domain:

    Line 38:
    $email = (empty($entries[0]["mail"][0]) ? $userid . '@' . $ad_sso_fqdn : $entries[0]["mail"][0]);

    Should be:
    $email = (empty($entries[0]["mail"][0]) ? $userid . '@' . $ad_sso_domain : $entries[0]["mail"][0]);

    The FQDN should not be seen as FQDN, but more as LDAP server.

  6. Shonu
    Member
    Posted 1 year ago #

    Sorry for the wrong filename and thanks for the code corrections. I willt ry those on next usage (not so soon, though)

  7. roko1
    Member
    Posted 11 months ago #

    No problem, we are only here to make this plug-in better ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Active Directory SSO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic