Thread:Extension talk:LDAP Authentication/Lost in getting LDAP Plugin to work (old works, new doesn't) (2)

I'm trying to move/migrate a working, old Mediawiki (1.11.0) installation that uses the LDAP Authentication Plugin (version 1.1e) -- NOTE: the header of the old file shows Version 1.1d / 12/04/2006. I'm trying to move to Mediawiki 1.22.2 and LDAP Authentication Plugin (Version 2.0f) -- choosing the 1.22 from the drop down list. Trying on both CentOS 6.5 and Ubuntu (server) 12.04. Both platforms have been updated. At least on the Ubuntu machine, I've got PHP-5.3.10 and MySQL 5.5.35. I'm even trying on an empty installation of Mediawiki (not trying to import any of the existing data).

My existing LDAP section follows the same example found in the Extension:LDAP_Authentication/AD_Configuration_Examples for the Single Domain Requiring Search Before Binding and Using a Proxy Agent. My existing LDAP section had two extra items that I've commented out thinking that was causing the issue ($wgLDAPUseSSL = false; and $wgLDAPUseLocal = false;).

The problem is if I use the old plugin file I can, with no changes to the LocalSettings.php, successfully log in but there are errors that show up on the the main page (don't remember what they were, and if needed can reproduce them, but the errors were probably incompatibilities with new PHP or etc.)

With the new plugin I just get -- Login error Incorrect password entered. Please try again. I've watched the traffic with Wireshark. I see the bindRequest and the bindResponse success. I see the searchRequest go out but with the new plugin I get nothing back.

require_once ("$IP/extensions/LdapAuthentication/LdapAuthentication.php"); $wgAuth = new LdapAuthenticationPlugin; $wgLDAPDomainNames = array( 'exampleDomain' ); $wgLDAPServerNames = array( 'exampleDomain' => 'FQDN_of_directory' ); $wgLDAPSearchAttributes = array( 'exampleDomain' => 'sAMAccountName' ); $wgLDAPBaseDNs = array( 'exampleDomain' => 'cn=users,dc=domain,dc=local' ); $wgLDAPUseSSL = false; $wgLDAPEncryptionType = array( 'exampleDomain' => 'clear' ); $wgMinimalPasswordLength = 1; $wgLDAPProxyAgent = array( 'exampleDomain' => 'cn=proxyAgent,cn=Users,dc=domain,dc=local' ); $wgLDAPProxyAgentPassword = array( 'exampleDomain' => 'SomeNotSoVerySpecialPassword' ); $wgLDAPUseLocal = false;

I don't know if it's a version difference (AD response) that the old plugin handles but the new plugin requires/doesn't like.

Any suggestions would be helpful. One option is to modify the old plugin to fix the complaints but that would require me to buy a PHP book and get significantly smarter. Not bad in the long run but doesn't help in the short term and I'm guessing this is something simple.