Recent Topics

LDAP plugin fatal error

Started by on Apr 05, 2007 – Contents updated: Apr 05, 2007

Apr 05, 2007 07:58    


Just did a clean install of b2evolution v1.9.3 and LDAP plugin, but after configuring LDAP settings and trying to login I get this error:

Fatal error: Call to undefined function: get_cache() in /var/www/blogs/plugins/_ldap.plugin.php on line 134

I turned on debugging but nothing shows up. Any ideas? My php version is 4.3.10.

Apr 06, 2007 10:57

I tried the latest version from svn, it fixed the error in line 134. After that I experienced "Could not bind to LDAP server!" error even though my settings and passwords should be correct. I believe that php tries to connect using LDAP v2 but my servers support only v3. Therefore I added this command to line 184:

ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3);

Now the bind works ok, but I get this error:
Fatal error: Call to undefined function: get_cache() in /var/www/blogs/plugins/_ldap.plugin.php on line 325

Apr 10, 2007 18:06

Ok. I've fixed the other get_Cache issues - I thought I've checked if there are others, but obviously have not. Same link:

About the LDAP protocol version: how does it fail exactly? Can you remove the "@" in front of the ldap_bind() call and enable error displaying (add "error_reporting(E_ALL); ini_set('display_errors', 'on');" before the ldap_bind call).

IMHO this should get handled by the plugin of course, instead of needing to change the plugin source.
Would it make sense to try with the default first, then v3 and/or v2? (according to what ldap_set_option() reports as the default)
And/or would it make sense to make this a config option? (e.g. use v3 only)?

May 02, 2007 10:27

Thanks, there's no more get_Cache issues!

About the LDAP protocol version, I tried what you suggested I only recieved this error:

Warning: ldap_bind(): Unable to bind to server: Protocol error in /var/www/blogs/plugins/_ldap.plugin.php on line 182

LDAP bind works 100% if the protocol version is set to V3. I think the protocol version should be a config option.

Form is loading...

powered by b2evolution – This forum is powered by b2evolution CMS, a complete engine for your website.