Support » Plugin: wpDirAuth » ldap_connect(): Could not create session handle:

  • Resolved andre.thomas


    I am almost ready to run with my multisite but I’m encountering what seems to be a small issue. I’m not sure if it’s related to your plugin or not so I thought I put this out there to see.

    Your plugin seems to working just fine on all browsers except Chrome. The error that is being logged into the debug file says…

    PHP Warning: ldap_connect(): Could not create session handle: Bad parameter to an ldap routine in D:\Webs\\wp-content\plugins\wpdirauth\wpDirAuth.php on line 378

    This wouldn’t be a problem for me necessarily if Chrome wasn’t such a popular browser. Hopefully, you can shine some light not he issue.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Paul Gilzow


    This shouldn’t be related to the browser in use. Line 378 is where the plugin sets up the connection to ldap. What do you have entered for your Directory Servers (Domain Controllers) in the settings?

    • This reply was modified 8 months, 2 weeks ago by  Paul Gilzow.,

    Plugin Author Paul Gilzow


    I think you might have found a bug. Can you try this version and let me know if it corrects the issue you’re seeing?

    It’s still not logging me in. However, there aren’t any new errors appearing on the debug.txt file. Should I expect there to be if the same problem persisted?

    Plugin Author Paul Gilzow


    if you aren’t seeing errors in the debug.log/txt file, then we corrected that issue. What error message(s) are you seeing when you attempt to authenticate?

    ERROR: Cookies are being blocked or not supported by your browser. You must enable cookies to use WordPress.

    But I checked. The cookies are enabled.

    Plugin Author Paul Gilzow


    ok, that sounds like a mismatch between the cookiedomain and the site domain. In your multisite set-up are you doing a domain-based multisite (each site has its own domain) or a directory-based multisite (each site is a subdirectory of a single domain)? If it is multiple independent domains, I actually wrote a blog post about it and the “cookies are blocked” issue:

    I’m doing the sub-directories (

    Plugin Author Paul Gilzow


    wpDirAuth doesn’t set the cookies, only adjusts the length of the cookie expiration via the filter auth_cookie_expiration. Do you have any other plugins related to authentication?

    Unfortunately, the cookie error is a common issue when setting up a multisite. Try creating a local test user, disable my plugin and see if you still get the same cookie error when logging into the local user account.

    In the mean time, I’ll add the fix from the test version above to the plugin and get it pushed out officially.

    The only plugins that are network activated are:

      Multisite Enhancements
      WordPress Importer

    The head website at which everyone should log in has the following activated:

      ARVE Advanced Responsive Video Embedder
      Buttons X – lite
      LoginPress – Customizing the WordPress Login

    I tried using the admin login (the original login created when you first install WordPress) on Chrome and IE and I’m getting the same error. I guess it doesn’t have anything to do with your plugin. I wonder what’s going on.

    • This reply was modified 8 months, 2 weeks ago by  andre.thomas.

    I found the answer. I’m sorry for taking up your time. At least you were able to find a bug!

    All I had to do was add the following lines to the config file:

    define('ADMIN_COOKIE_PATH', '/');
    define('COOKIE_DOMAIN', '');
    define('COOKIEPATH', '');
    define('SITECOOKIEPATH', ''); 

    Now it works on both browsers. See the link below for more details. – Cookie Issue

    Plugin Author Paul Gilzow


    Glad you were able to track it down. Let me know if you need help with anything else.

    Will do. I appreciate your customer service, prompt replies and willingness to help.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘ldap_connect(): Could not create session handle:’ is closed to new replies.