Jump to content

Topic on Extension talk:LdapAuth

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"