Topic on Project:Support desk

HTTP 500 Error on LDAP Authentication Success

2
192.195.67.2 (talkcontribs)

On correct active directory login attempts, I am served a HTTPD 500 error and the following in my logs:

[Wed Dec 06 10:51:30.970624 2017] [:error] [pid 3369] [client [redacted]] PHP Notice:  Use of undefined constant DB_REPLICA - assumed 'DB_REPLICA' in /usr/share/mediawiki123/extensions/LdapAuthentication/LdapAuthenticationPlugin.php on line 2111, referer: http://[redacted]/index.php/Special:UserLogin
[Wed Dec 06 10:51:30.970654 2017] [:error] [pid 3369] [client [redacted]] PHP Notice:  Undefined index: DB_REPLICA in /usr/share/mediawiki123/includes/db/LoadBalancer.php on line 591, referer: http://[redacted]/index.php/Special:UserLogin
[Wed Dec 06 10:51:30.970661 2017] [:error] [pid 3369] [client [redacted]] PHP Notice:  Undefined index: type in /usr/share/mediawiki123/includes/db/LoadBalancer.php on line 720, referer: http://[redacted]/index.php/Special:UserLogin
[Wed Dec 06 10:51:30.970972 2017] [:error] [pid 3369] [client [redacted]] PHP Fatal error:  Call to a member function setLBInfo() on a non-object in /usr/share/mediawiki123/includes/db/LoadBalancer.php on line 727, referer: http://[redacted]/index.php/Special:UserLogin

On incorrect active directory login attempts, I get the normal incorrect username or password message. Both with a proxy agent and without a proxy agent, I get the same issue. Also, nothing is showing in /tmp/debug.log.

I am running MediaWiki 1.23, PHP 5.4.16, MySQL 5.5.56, and CentOS 7.4.

$wgAuth = new LdapAuthenticationPlugin();

$wgLDAPDomainNames      = array('[redacted]');
$wgLDAPServerNames      = array('[redacted]' => '[redacted]');
$wgLDAPEncryptionType   = array('[redacted]' => 'clear');

$wgLDAPSearchStrings    = array('[redacted]' => "USER-NAME@[redacted]" );

$wgLDAPBaseDNs          = array('[redacted]' => '[redacted]');
$wgLDAPSearchAttributes = array('[redacted]' => 'samaccountname');

#$wgLDAPProxyAgent      = array('[redacted]' => '[redacted]');
#$wgLDAPProxyAgentPassword = array('[redacted]' => '[redacted]');

$wgLDAPDebug = 3;
$wgDebugLogGroups["ldap"] = "/tmp/debug.log";
Ciencia Al Poder (talkcontribs)

Looks like you have installed an LDAP extension for the latest MediaWiki version, while you're using MediaWiki 1.23. That won't work. You should download the extension for the 1.23 version of MediaWiki, or even better, upgrade MediaWiki to one of the supported versions since 1.23 is no longer supported.