Jump to content

Extension talk:LdapAuth

About this board

Can this extension work properly on mediawiki 1.41.1

1
Qyingy (talkcontribs)

The following exception occurred

"MediaWiki\Config\ConfigException: MediaWiki\Config\GlobalVarConfig::get: undefined option: 'DomainNames'"

when I add them in LocalSettings.php like that:

wfLoadExtension( 'LdapAuth' );

$wgLdapAuthDomainNames = 'MY_DOMAIN_HERE';

$wgLdapAuthServers = 'SERVER1,SERVER2,SERVER3';

$wgLdapAuthBindDN = 'MY_BIND_DN_HERE';

$wgLdapAuthBindPass = 'PASSWORD_FOR_BIND_DN';

My versions are:

MediaWiki 1.41.1

PHP 8.1.2-1ubuntu2.18 (apache2handler)

Reply to "Can this extension work properly on mediawiki 1.41.1"

Will this extension be updated to work with PHP8.1?

2
24.250.11.42 (talkcontribs)

I tried to install this with composer but it complains that I am running php8.1 and not a version of php7.x

TrixTri (talkcontribs)

I have not tried this on newer PHP versions, but it looks to be using the PHP LDAP client by Symfony 4.1. What happens if you edit the composer.json file in the LdapAuth extension directory and find the line

"symfony/ldap": "^4.1"

and change it from 4.1 to 6.2 or what ever the latest current version of Symfony Ldap is and try it again which seems to be compatible with PHP 8.1 from what I am reading unsure how compatible it is with LdapAuth however.

Reply to "Will this extension be updated to work with PHP8.1?"

Authentication Email error

4
Patt435 (talkcontribs)

I have Mediawiki 1.30 installed on Debian Linux

i´ve used the config in LocalSettings.php from TrixTri, it establishes the connection to LDAP but it trys to sync with email somehow, the User created on AD has no email address.

I get this Error:


Shanept\LdapAuth\Exceptions\MappingException from line 177 of /srv/http/mediawiki/extensions/LdapAuth/src/Groups/LdapGroupSync.php: No email found for "MyADUser".

Backtrace:

#0 /srv/http/mediawiki/extensions/LdapAuth/src/Groups/LdapGroupSync.php(94): Shanept\LdapAuth\Groups\LdapGroupSync->fetchData()

#1 /srv/http/mediawiki/extensions/LdapAuth/src/Auth/PrimaryAuthenticationProvider.php(192): Shanept\LdapAuth\Groups\LdapGroupSync->map()

#2 /srv/http/mediawiki/includes/auth/AuthManager.php(2444): Shanept\LdapAuth\Auth\PrimaryAuthenticationProvider->postAuthentication(User, MediaWiki\Auth\AuthenticationResponse)

#3 /srv/http/mediawiki/includes/auth/AuthManager.php(695): MediaWiki\Auth\AuthManager->callMethodOnProviders(integer, string, array)

#4 /srv/http/mediawiki/includes/auth/AuthManager.php(384): MediaWiki\Auth\AuthManager->continueAuthentication(array)

#5 /srv/http/mediawiki/includes/specialpage/AuthManagerSpecialPage.php(353): MediaWiki\Auth\AuthManager->beginAuthentication(array, string)

#6 /srv/http/mediawiki/includes/specialpage/AuthManagerSpecialPage.php(482): AuthManagerSpecialPage->performAuthenticationStep(string, array)

#7 /srv/http/mediawiki/includes/htmlform/HTMLForm.php(660): AuthManagerSpecialPage->handleFormSubmit(array, VFormHTMLForm)

#8 /srv/http/mediawiki/includes/specialpage/AuthManagerSpecialPage.php(416): HTMLForm->trySubmit()

#9 /srv/http/mediawiki/includes/specialpage/LoginSignupSpecialPage.php(313): AuthManagerSpecialPage->trySubmit()

#10 /srv/http/mediawiki/includes/specialpage/SpecialPage.php(569): LoginSignupSpecialPage->execute(NULL)

#11 /srv/http/mediawiki/includes/specialpage/SpecialPageFactory.php(558): SpecialPage->run(NULL)

#12 /srv/http/mediawiki/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)

#13 /srv/http/mediawiki/includes/MediaWiki.php(865): MediaWiki->performRequest()

#14 /srv/http/mediawiki/includes/MediaWiki.php(515): MediaWiki->main()

#15 /srv/http/mediawiki/index.php(42): MediaWiki->run()

#16 {main}


thanks for help


TrixTri (talkcontribs)

So you are using Microsoft's Active Directory, it should not be running those functions from what I can tell, did you forget to add the line $wgLdapAuthIsActiveDirectory = true;

or do something odd like use the line $wgLdapAuthIsOpenLDAP = true;

Patt435 (talkcontribs)

this is the config of LocalSettings.php that i use:


wfLoadExtension( 'LdapAuth' );

$wgGroupPermissions['*'] ['autocreateaccount'] = true;

$wgLdapAuthDomainNames = ['abc.local'];

$wgLdapAuthServers = ['abc.local' => ['srv-dc01.abc.local', 'srv-dc02.abc.local']];

$wgLdapAuthDisplayName  = ['abc.local' => 'abc'];

#$wgLdapAuthBindDN = [ 'abc.local' => 'CN=ABC,OU=Users,DC=abc,DC=local'];

#$wgLdapAuthBindPass = ['abc.local' => 'validaduserspassword'];

$wgLdapAuthEncryptionType = ['abc.local' => 'none'];

$wgLdapAuthSearchFilter = ['abc.local' => '(&(objectClass=user)(sAMAccountName=%1$s))']; # (&(objectClass=user)(sAMAccountName=%1$s)(memberof=CN=GRP - WikiUsers,OU=Groups,DC=abc,DC=local)), (memberof=DC=abc,DC=local)

$wgLdapAuthBaseDN = ['abc.local' => 'DC=abc,DC=local']; // OU=abc,

#$wgLdapAuthBaseDN = ['false'];

$wgLdapAuthIsActiveDirectory = true;

$wgLdapAuthUsernameField = ['abc.local' => 'sAMAccountName'];

$wgLdapAuthSearchTree = ['abc.local' => true];

$wgLdapAuthMapGroups = ['abc.local' => []];

#$wgLdapAuthUseLocal = true;

#Enable Scure Login

$wgSecureLogin = true;


EDit: Yes its a MS Directory Server. i just added $wgLdapAuthIsOpenLDAP = true; and now it works!

TrixTri (talkcontribs)

Did not expect that to fix your problem I have to admit, but as it's working lets walk away slowly smiling before we p*ss it off.

Reply to "Authentication Email error"

LdapAuth returns "The supplied credentials are not associated with any user on this wiki."

2
208.53.65.3 (talkcontribs)

I have Ldap Authentication working, but whenever a user attempts to log in "The supplied credentials are not associated with any user on this wiki." is displayed. The thing is, I have created test accounts in mediawiki that match the username. I know that the ldap is working because whenever I type in a wrong password it gives a wrong password error. My config(preliminary, just trying to get logins working) is:

wfLoadExtension( 'LdapAuth' );

$wgLdapAuthDomainNames = '<Domain Name>';

$wgLdapAuthIsActiveDirectory = true;

$wgLdapAuthServers = '<IP>';

$wgLdapAuthBindDN = '<CN>';

$wgLdapAuthBindPass = '<Password to account>';

$wgLdapAuthBaseDN = '<Path to user accounts>';

$wgLdapAuthUsernameField = 'samid';

$wgLdapAuthUseLocal = true;

$wgGroupPermissions['*']['autocreateaccount'] = true;

$wgGroupPermissions['*']['createaccount'] = true;

This will obviously be refined after I can get logins working (I need group sync at the very least), but from what I'm seeing it should work? Could it be that I'm trying to use this with BlueSpice because I had no luck with LdapStack?

208.53.65.3 (talkcontribs)

I figured it out, the issue was with me using samid (used for dsquery) instead of sAMAccountName for anyone wondering

Reply to "LdapAuth returns "The supplied credentials are not associated with any user on this wiki.""

LdapAuth: After login, browser displays blank page

2
Evops (talkcontribs)

Hello everyone.

I set up the LdapAth extension by following the following link:

Extension:LdapAuth

However after executing the login, the page presented is blank.

I added the following lines to LocalSettings.conf

wfLoadExtension( 'LdapAuth' );

$wgGroupPermissions['*'] ['autocreateaccount'] = true;

$wgLdapAuthDomainNames = ['EVOPS.LAN'];

$wgLdapAuthIsActiveDirectory = ['EVOPS.LAN' => true];

$wgSecureLogin = ['EVOPS.LAN' => true];

$wgLdapAuthUseLocal = ['EVOPS.LAN' => true];

$wgLdapAuthRequireDomain = ['EVOPS.LAN' => true];

#$wgLdapAuthDisplayName  = ['EVOPS.LAN' => ['evops']];

$wgLdapAuthEncryptionType = ['EVOPS.LAN' => 'none'];

$wgLdapAuthSearchTree = ['EVOPS.LAN' => true];

$wgLdapAuthServers = ['EVOPS.LAN' => ['localhost']];

$wgLdapAuthBindDN = ['EVOPS.LAN' => ['cn=mediawiki,ou=System Users,ou=Enterprise,dc=evops,dc=lan']];

$wgLdapAuthBindPass = ['EVOPS.LAN' => '123456'];

$wgLdapAuthBaseDN = ['EVOPS.LAN' => ['cn=Wiki Users,ou=Wiki,ou=Services,ou=Enterprise,dc=evops,dc=lan']];

$wgLdapAuthUsernameField = ['EVOPS.LAN' => ['uid']];

$wgLdapAuthMapGroups = ['EVOPS.LAN' => []];


MediaWiki version used is 1.31.1, my web server is NGINX, PHP 7.2, LDAP is SAMBA4, CentOS 7.7


Has anyone ever seen this happen? Have an idea how to solve?


Best regards,


TrixTri (talkcontribs)

You probably have an error your not seeing, try putting the lines

error_reporting( E_ALL );

ini_set( 'display_errors', 1 );

after the <?php in LocalSettings.php

one tip, if you get a forbidden message change $wgLdapAuthBaseDN to point to a OU

also try reading https://mediawiki.org/wiki/Manual:How_to_debug for more debugging tips

Reply to "LdapAuth: After login, browser displays blank page"

PHP Fatal error: Uncaught InvalidArgumentException:

3
45.3.74.56 (talkcontribs)

I get the below error when trying to enable the LdapAuth extension. I'm stuck using mediawiki version 1.30 because of another extension hasn't been updated yet. Fresh install of this extension. Any known fixes for this one?


PHP Fatal error:  Uncaught InvalidArgumentException: Invalid callback provided in /var/lib/mediawiki/includes/config/ConfigFactory.php:108

Stack trace:

#0 /var/lib/mediawiki/includes/ServiceWiring.php(92): ConfigFactory->register('LdapAuth', 'Shanept\\LdapAut...')

#1 [internal function]: MediaWiki\Services\ServiceContainer->{closure}(Object(MediaWiki\MediaWikiServices))

#2 /var/lib/mediawiki/includes/services/ServiceContainer.php(360): call_user_func_array(Object(Closure), Array)

#3 /var/lib/mediawiki/includes/services/ServiceContainer.php(344): MediaWiki\Services\ServiceContainer->createService('ConfigFactory')

#4 /var/lib/mediawiki/includes/MediaWikiServices.php(219): MediaWiki\Services\ServiceContainer->getService('ConfigFactory')

#5 /var/lib/mediawiki/includes/MediaWikiServices.php(193): MediaWiki\MediaWikiServices->salvage(Object(MediaWiki\MediaWikiServices))

#6 /var/lib/mediawiki/includes/Setup.php(533): MediaWiki\MediaWikiServices::resetGlobalInstance(Object(GlobalVarConfig), 'quick')

#7 /var/lib/mediawiki/maintenance/d in /var/lib/mediawiki/includes/config/ConfigFactory.php on line 108

Wrathofmcgrath (talkcontribs)

do I have to install/enable it using composer? if so how would I go about doing that?

TrixTri (talkcontribs)

Run the command composer require symfony/ldap

Reply to "PHP Fatal error: Uncaught InvalidArgumentException:"

Freeipa Authtication errors

3
Deathhampsterx (talkcontribs)

I have Mediawiki 1.31 installed on Centos 7 as well as the latest version of FreeIPA on another Centos7 machine. I've tried joining Mediawiki to the FreeIPA domain with LdapAuth, but keep getting errors in the mediawiki logs when trying to log into Mediawiki with an LDAP account:


[authentication] Attempting to bind to LDAP for search with DN "uid=mediawiki,cn=sysaccounts,cn=etc,dc=DOMAIN,dc=com@DOMAIN.COM".

[authentication] Bound successfully.

[authentication] Incorrect username or password entered.


I know the username and password listed in my config is correct but I keep seeing this error: Here's my config in LocalSettings.php


wfLoadExtension( 'LdapAuth' );

$wgLdapAuthDomainNames = ['DOMAIN.COM'];

$wgLdapAuthServers = 'FREEIPA_server1, FREEIPA_server2';

$wgLdapAuthBindDN = 'uid=mediawiki,cn=sysaccounts,cn=etc,dc=DOMAIN,dc=com';

$wgLdapAuthBindPass = 'PASSWORD';

$wgLdapAuthUseLocal = true;


I also set up the FreeIPA client on the mediawiki machine and can ssh to it with LDAP accounts no problem.


Any thoughts?

TrixTri (talkcontribs)

Yes, your config is wrong ( I know its not your fault as you followed the instructions on the main page)


Copy my entire config in the post 'Mediawiki 1.33' keeping the same format which is quite different to what you are using.

One thing you can modify is the search filter, mine will only allow users in a particular group, if you want to allow all users change the line to

$wgLdapAuthSearchFilter = ['domain' => '(&(objectClass=user)(sAMAccountName=%1$s))'];

Deathhampsterx (talkcontribs)

Thanks for the info, however, it doesn't like the arrays. I tried your config after removing the AD stuff because FreeIPA has no sAMAccountName object class. I get this Error:

preg_split() expects parameter 2 to be string, array given in /var/www/mediawiki-1.31.5/extensions/LdapAuth/src/Hooks/Config.php on line 154.

config:

wfLoadExtension( 'LdapAuth' );

$wgGroupPermissions['*'] ['autocreateaccount'] = true;

$wgLdapAuthDomainNames = ['DOMAIN.com'];

$wgLdapAuthServers = ['DOMAIN.com' => [‘SERVER1.DOMAIN.com', ‘SERVER2.DOMAIN.com']];

$wgLdapAuthBindDN = [ 'DOMAIN.com' => 'uid=mediawiki,cn=users,cn=accounts,dc=DOMAIN,dc=com'];

$wgLdapAuthBindPass = ['DOMAIN.com' => ‘PASSWORD’];

$wgLdapAuthEncryptionType = ['DOMAIN.com' => 'none'];

#$wgLdapAuthSearchFilter = ['DOMAIN.com' => '(&(objectClass=user)(sAMAccountName=%1$s)(memberof=CN=GRP - WikiUsers,OU=Groups,DC=DOMAIN,DC=com))'];

$wgLdapAuthSearchFilter = '(&(objectClass=user)(displayName=%1$s))';

$wgLdapAuthBaseDN = ['DOMAIN.com' => 'DC=DOMAIN,DC=com'];

#$wgLdapAuthIsActiveDirectory = true;

#$wgLdapAuthUsernameField = ['DOMAIN.com' => 'sAMAccountName'];

$wgLdapAuthSearchTree = ['DOMAIN.com' => true];

$wgLdapAuthMapGroups = ['DOMAIN.com' => []];


If I remove all the arrays, the errors go away, but then I'm back at my previous issue where it rejects like my mediawiki service account. I know the account works, because I've used it successfully with other things.

I also get the same results no matter what the searchfilter is set to.

thanks for the help, it would be nice to get this working with FreeIPA, but I can always go back to using Extension:LDAP Authentication





Reply to "Freeipa Authtication errors"
46.189.19.66 (talkcontribs)

Hello Trix Tri,


i can't bind our LDAP Users (Debian 8 openLDAP Server)

My Config...

wfLoadExtension( 'LdapAuth' );

$wgGroupPermissions['*']['autocreateaccount'] = true;

$wgLdapAuthDomainNames = 'Domain'; <- Can i use any Name here?

$wgLdapAuthServers = 'IP';

$wgLdapAuthBindDN = 'cn=user,dc=domain,dc=com';

$wgLdapAuthBindPass = 'password';

$wgLdapAuthBaseDN = 'ou=people,ou=PDF,l=location,dc=domain,dc=com';

$wgLdapAuthSearchFilter = '(&(objectClass=person)(uid=%1$s))';

$wgLdapAuthUsernameField = 'uid';

$wgLdapAuthSearchTree = true;

$wgLdapAuthUseLocal = true;

$wgLdapAuthEncryptionType = false;

$wgLdapAuthIsActiveDirectory = false;

$wgLdapAuthRequireDomain = true;


uid = user.name


In LDAP log comes this error...

ldap slapd[777]: conn=14420181 op=1 do_bind: invalid dn (user.name@Domain)


LDAP structur

uid=user.name,ou=people,ou=PDF,l=location,dc=domain,dc=com


What goes wrong?

TrixTri (talkcontribs)

Copy my entire config in the post 'Mediawiki 1.33' keeping the same format which is quite different to what you are using.

One thing you can modify is the search filter, mine will only allow users in a particular group, if you want to allow all users change the line to

$wgLdapAuthSearchFilter = ['domain' => '(&(objectClass=user)(sAMAccountName=%1$s))'];

Reply to "do_bind: invalid dn"

Fatal Error after activating LdapAuth Plugin and logging in with LDAP user

7
195.52.219.126 (talkcontribs)

Hello Community,

i have installed the plugin like the steps under installation. but iam getting this error: Interner Fehler [86c7ce4e15481f54deadae36] 2019-04-26 09:14:04: Fataler Ausnahmefehler des Typs „Error“


My Server:

MediaWiki 1.31.0 PHP 7.2.17-1+ubuntu16.04.1+deb.sury.org+3 (apache2handler) MySQL 5.7.25-0ubuntu0.16.04.2 ICU 64.1


After activating the plungin i can also not login with admin user.

195.52.219.126 (talkcontribs)

My Cofig: wfLoadExtension( 'LdapAuth' ); $wgLdapAuthDomainNames = 'company.local'; $wgLdapAuthServers = '10.10.0.2'; $wgLdapAuthBindDN = 'CN=ldapuser,CN=Users,DC=company,DC=Local'; $wgLdapAuthBindPass = 'ldappassword'; $wgLdapAuthBaseDN = 'OU=wiki,OU=Benutzer,DC=company,DC=Local'; $wgLdapAuthSearchTree = true; $wgLdapAuthSearchFilter = '(&(objectClass=user)(sAMAccountName=%s))'; $wgLdapAuthEncryptionType = false; $wgLdapAuthIsActiveDirectory = true; $wgLdapAuthUseLocal = true;

I'msuzie (talkcontribs)

You can allow login with local admin by adding this in LocalSettings:


$wgLdapAuthUseLocal = true;

I'msuzie (talkcontribs)

I get the same thing though.

Set this in your LocalSettings.php to show better errors:

error_reporting( -1 );

ini_set( 'display_errors', 1 );

$wgShowExceptionDetails = true;

$wgShowDBErrorBacktrace = true;


More verbose error reporting shows this:

[XMsiOxY1GBxqYnzCqifKOgAAAAA] /index.php?title=Special:UserLogin&returnto=Main+Page Error from line 388 of /var/www/html/extensions/LdapAuth/src/Auth/PrimaryAuthenticationProvider.php: Class 'Symfony\Component\Ldap\Ldap' not found

Backtrace:

#0 /var/www/html/extensions/LdapAuth/src/Auth/PrimaryAuthenticationProvider.php(110): Shanept\LdapAuth\Auth\PrimaryAuthenticationProvider->connect(Shanept\LdapAuth\Auth\LdapAuthenticationRequest)

#1 /var/www/html/extensions/LdapAuth/src/Auth/PrimaryAuthenticationProvider.php(88): Shanept\LdapAuth\Auth\PrimaryAuthenticationProvider->beginPrimaryLdapAuthentication(Shanept\LdapAuth\Auth\LdapAuthenticationRequest)

#2 /var/www/html/includes/auth/AuthManager.php(453): Shanept\LdapAuth\Auth\PrimaryAuthenticationProvider->beginPrimaryAuthentication(array)

#3 /var/www/html/includes/auth/AuthManager.php(383): MediaWiki\Auth\AuthManager->continueAuthentication(array)

#4 /var/www/html/includes/specialpage/AuthManagerSpecialPage.php(353): MediaWiki\Auth\AuthManager->beginAuthentication(array, string)

#5 /var/www/html/includes/specialpage/AuthManagerSpecialPage.php(482): AuthManagerSpecialPage->performAuthenticationStep(string, array)

#6 /var/www/html/includes/htmlform/HTMLForm.php(665): AuthManagerSpecialPage->handleFormSubmit(array, VFormHTMLForm)

#7 /var/www/html/includes/specialpage/AuthManagerSpecialPage.php(416): HTMLForm->trySubmit()

#8 /var/www/html/includes/specialpage/LoginSignupSpecialPage.php(317): AuthManagerSpecialPage->trySubmit()

#9 /var/www/html/includes/specialpage/SpecialPage.php(569): LoginSignupSpecialPage->execute(NULL)

#10 /var/www/html/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)

#11 /var/www/html/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)

#12 /var/www/html/includes/MediaWiki.php(860): MediaWiki->performRequest()

#13 /var/www/html/includes/MediaWiki.php(517): MediaWiki->main()

#14 /var/www/html/index.php(42): MediaWiki->run()

#15 {main}

94.218.175.104 (talkcontribs)

I'm getting the exact same error with missing symfony ldap component.

94.218.175.104 (talkcontribs)

Fixed for me after manually running "composer install && composer require symfony/ldap" in the main directory, after everything else has been installed.


193.175.73.216 (talkcontribs)

Running "composer install --no-dev" could be even better. This is stated in the install section of the extension.

Unfortunately I saw it too late and used "composer install --no-dev && composer require --update-no-dev symfony/ldap" in the main directory. Without the "--no-dev" stuff many additional packages get installed and one of them caused problems in my install.

Reply to "Fatal Error after activating LdapAuth Plugin and logging in with LDAP user"

LDAP Login Internal error, Upgarde from MW1.32 to 1.33 gives me this error

9
Sam Madisha (talkcontribs)

[4d35954210787c4a8838eda8] /index.php?title=Special:UserLogin&returnto=Bryte+Wiki TypeError from line 39 of C:\inetpub\wwwroot\mediawiki\includes\auth\PasswordDomainAuthenticationRequest.php: Argument 1 passed to MediaWiki\Auth\PasswordDomainAuthenticationRequest::__construct() must be of the type array, string given, called in C:\inetpub\wwwroot\mediawiki\extensions\LdapAuth\src\Auth\PrimaryAuthenticationProvider.php on line 62

Backtrace:

#0 C:\inetpub\wwwroot\mediawiki\extensions\LdapAuth\src\Auth\PrimaryAuthenticationProvider.php(62): MediaWiki\Auth\PasswordDomainAuthenticationRequest->__construct(string)

#1 C:\inetpub\wwwroot\mediawiki\includes\auth\AuthManager.php(2100): Shanept\LdapAuth\Auth\PrimaryAuthenticationProvider->getAuthenticationRequests(string, array)

#2 C:\inetpub\wwwroot\mediawiki\includes\auth\AuthManager.php(2078): MediaWiki\Auth\AuthManager->getAuthenticationRequestsInternal(string, array, array, User)

#3 C:\inetpub\wwwroot\mediawiki\includes\specialpage\AuthManagerSpecialPage.php(256): MediaWiki\Auth\AuthManager->getAuthenticationRequests(string, User)

#4 C:\inetpub\wwwroot\mediawiki\includes\specialpage\LoginSignupSpecialPage.php(141): AuthManagerSpecialPage->loadAuth(NULL)

#5 C:\inetpub\wwwroot\mediawiki\includes\specialpage\LoginSignupSpecialPage.php(229): LoginSignupSpecialPage->load(NULL)

#6 C:\inetpub\wwwroot\mediawiki\includes\specialpage\SpecialPage.php(569): LoginSignupSpecialPage->execute(NULL)

#7 C:\inetpub\wwwroot\mediawiki\includes\specialpage\SpecialPageFactory.php(558): SpecialPage->run(NULL)

#8 C:\inetpub\wwwroot\mediawiki\includes\MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)

#9 C:\inetpub\wwwroot\mediawiki\includes\MediaWiki.php(865): MediaWiki->performRequest()

#10 C:\inetpub\wwwroot\mediawiki\includes\MediaWiki.php(515): MediaWiki->main()

#11 C:\inetpub\wwwroot\mediawiki\index.php(42): MediaWiki->run()

#12 {main}

TrixTri (talkcontribs)

Seems to be a problem in version 0.0.5. It looks like it is coded to require an array for LdapAuthDomainNames and in turn means all your other variables must also. Look for my post "Mediawiki 1.33" for a complete working config Dont follow the instructions on the main page. Make sure to use the entire config as it is and change what is required or you will have errors.

StefanArndtLu (talkcontribs)

Dear Trix Tri,


I have the same problems, and tried it with your config. But I did get the following error report:

/wiki/Mediawiki/index.php?title=Special:UserLogin&returnto=Main+Page Error from line 393 of /var/www/html/wiki/Mediawiki/extensions/LdapAuth/src/Auth/PrimaryAuthenticationProvider.php: Class 'Symfony\Component\Ldap\Ldap' not found

Backtrace:

#0 /var/www/html/wiki/Mediawiki/extensions/LdapAuth/src/Auth/PrimaryAuthenticationProvider.php(110): Shanept\LdapAuth\Auth\PrimaryAuthenticationProvider->connect(Shanept\LdapAuth\Auth\LdapAuthenticationRequest)

#1 /var/www/html/wiki/Mediawiki/extensions/LdapAuth/src/Auth/PrimaryAuthenticationProvider.php(88): Shanept\LdapAuth\Auth\PrimaryAuthenticationProvider->beginPrimaryLdapAuthentication(Shanept\LdapAuth\Auth\LdapAuthenticationRequest)

#2 /var/www/html/wiki/Mediawiki/includes/auth/AuthManager.php(454): Shanept\LdapAuth\Auth\PrimaryAuthenticationProvider->beginPrimaryAuthentication(array)

#3 /var/www/html/wiki/Mediawiki/includes/auth/AuthManager.php(384): MediaWiki\Auth\AuthManager->continueAuthentication(array)

#4 /var/www/html/wiki/Mediawiki/includes/specialpage/AuthManagerSpecialPage.php(353): MediaWiki\Auth\AuthManager->beginAuthentication(array, string)

#5 /var/www/html/wiki/Mediawiki/includes/specialpage/AuthManagerSpecialPage.php(482): AuthManagerSpecialPage->performAuthenticationStep(string, array)

#6 /var/www/html/wiki/Mediawiki/includes/htmlform/HTMLForm.php(660): AuthManagerSpecialPage->handleFormSubmit(array, VFormHTMLForm)

#7 /var/www/html/wiki/Mediawiki/includes/specialpage/AuthManagerSpecialPage.php(416): HTMLForm->trySubmit()

#8 /var/www/html/wiki/Mediawiki/includes/specialpage/LoginSignupSpecialPage.php(313): AuthManagerSpecialPage->trySubmit()

#9 /var/www/html/wiki/Mediawiki/includes/specialpage/SpecialPage.php(569): LoginSignupSpecialPage->execute(NULL)

#10 /var/www/html/wiki/Mediawiki/includes/specialpage/SpecialPageFactory.php(558): SpecialPage->run(NULL)

#11 /var/www/html/wiki/Mediawiki/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)

#12 /var/www/html/wiki/Mediawiki/includes/MediaWiki.php(865): MediaWiki->performRequest()

#13 /var/www/html/wiki/Mediawiki/includes/MediaWiki.php(515): MediaWiki->main()

#14 /var/www/html/wiki/Mediawiki/index.php(42): MediaWiki->run()

#15 {main}

Did you maybe have that error reporting aswell and know a solution by any chance?

TrixTri (talkcontribs)

It seems to be trying to use the Ldap classes provided by Symfony which it cannot find. Make sure composer is installed on your machine and navigate to the LdapAuth extension directory and run the command composer install --no-dev to install the required dependancies.

Pa.tiumentsev (talkcontribs)

Dear TrixTri,

I have the same problem (Class 'Symfony\Component\Ldap\Ldap' not found). I try to do "composer is installed on your machine and navigate to the LdapAuth extension directory and run the command composer install --no-dev" but problem is stell remains. Do you have another thoughts about how to fix it?


TrixTri (talkcontribs)

Out of curiosity, if you run the same command from the wiki base folder rather than the plugin directory does it work? if not try running the command composer require symfony/ldap

Pa.tiumentsev (talkcontribs)

After this command "composer require symfony/ldap" error "Class 'Symfony\Component\Ldap\Ldap' not found" is gone, but when i do "php maintenance/update.php" i see new error :

symfony/ldap: 4.3.0 installed, 4.3 required.

Error: your composer.lock file is not up to date. Run "composer update --no-dev" to install newer dependencies

It gone when change line 59 in file /var/lib/mediawiki/composer.json from "symfony/ldap": "v4.3" to "symfony/ldap": "v4.3.0"

Now when i type my login and password from ldap on media wiki login page it give me error about wrong loggin or password, i think i write wrong config in LocalSettings.php...

Pa.tiumentsev (talkcontribs)

For fix this problem need add line: $wgGroupPermissions['*']['autocreateaccount'] = true; to LocalSettings.php

This post was hidden by StefanArndtLu (history)
Reply to "LDAP Login Internal error, Upgarde from MW1.32 to 1.33 gives me this error"