-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MediaWiki 1.34 Fatal exception “TypeError” #13
Comments
Hi @LNazca This definitely looks like a bizarre issue. It seems you have configured the extension correctly, so I'm not sure what the problem is. Are you able to do a var_dump on the $domains variable, before the return, and see what value it returns when your domain is configured as a string (as in your first error)? Kind Regards |
Hi @LNazca, Hi Shane I've got the similar issue with my new MW 1.33: _271c44a9026b8c8d6f23335a] /mediawiki/index.php?title=Sp%C3%A9cial:Connexion&returnto=Main+Page TypeError from line 39 of C:\Bitnami\mediawiki-1.33.0-1\apps\mediawiki\htdocs\includes\auth\PasswordDomainAuthenticationRequest.php: Argument 1 passed to MediaWiki\Auth\PasswordDomainAuthenticationRequest::__construct() must be of the type array, string given, called in C:\Bitnami\mediawiki-1.33.0-1\apps\mediawiki\htdocs\extensions\LdapAuth\src\Auth\PrimaryAuthenticationProvider.php on line 62 Backtrace: #0 C:\Bitnami\mediawiki-1.33.0-1\apps\mediawiki\htdocs\extensions\LdapAuth\src\Auth\PrimaryAuthenticationProvider.php(62): MediaWiki\Auth\PasswordDomainAuthenticationRequest->_construct(string) This extension worked fin with my past MW 1.31. I run Composer to install PHP dependencies, but no way still same error Many thanks for your help, |
I had quite a lot of trouble making this work with Mediawiki 1.33 in Ubuntu Server 18.04 so I thought I would document my steps case anyone was to be going through the same trouble. It seems like the root of my trouble spawned from the fact that $wgLdapAuthDomainNames seems to require an array even though we only require a single domain and it seems that all the other variables need to be also so after a bunch of messing around the configuration below is what I used that seems to work with an Active Directory based domain Enabled ldap support in PHP by running apt-get install php7.X-ldap and editing the php.ini file to uncomment extension=ldap making sure to reboot the web server application, Apache in my case (Unsure if this is required) Added the lines below in the LocalSettings.php file
If you change the encryption type as TLS and it gives you the error 'Could not successfully connect to an LDAP server' edit the file /etc/ldap/ldap.conf and insert the line 'TLS_REQCERT never' without the quotes you to bypass the certificate check or better yet make sure it exists |
Hi, I'm trying to use this extension with version 1.34 MediaWiki. But I'm facing this issue.
![Screenshot from 2019-06-18 10-59-07](https://user-images.githubusercontent.com/1470873/59690703-37577800-91b8-11e9-82b1-64a008f9af35.png)
With this configuration pattern:
With debug enabled I get errors about variable format:
[exception] [6f033baae0b3ac339b1b0450] /index.php?title=Especial:Autenticar-se&returnto=P%C3%A1gina+principal TypeError from line 39 of /var/www/mediawiki/includes/auth/PasswordDomainAuthenticationRequest.php: Argument 1 passed to MediaWiki\Auth\PasswordDomainAuthenticationRequest::__construct() must be of the type array, string given, called in /var/www/mediawiki/extensions/LdapAuth/src/Auth/PrimaryAuthenticationProvider.php on line 62
#0 /var/www/mediawiki/extensions/LdapAuth/src/Auth/PrimaryAuthenticationProvider.php(62): MediaWiki\Auth\PasswordDomainAuthenticationRequest->__construct(string)
#1 /var/www/mediawiki/includes/auth/AuthManager.php(2104): Shanept\LdapAuth\Auth\PrimaryAuthenticationProvider->getAuthenticationRequests(string, array)
#2 /var/www/mediawiki/includes/auth/AuthManager.php(2082): MediaWiki\Auth\AuthManager->getAuthenticationRequestsInternal(string, array, array, User)
#3 /var/www/mediawiki/includes/specialpage/AuthManagerSpecialPage.php(256): MediaWiki\Auth\AuthManager->getAuthenticationRequests(string, User)
#4 /var/www/mediawiki/includes/specialpage/LoginSignupSpecialPage.php(141): AuthManagerSpecialPage->loadAuth(NULL)
#5 /var/www/mediawiki/includes/specialpage/LoginSignupSpecialPage.php(229): LoginSignupSpecialPage->load(NULL)
#6 /var/www/mediawiki/includes/specialpage/SpecialPage.php(571): LoginSignupSpecialPage->execute(NULL)
#7 /var/www/mediawiki/includes/specialpage/SpecialPageFactory.php(575): SpecialPage->run(NULL)
#8 /var/www/mediawiki/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#9 /var/www/mediawiki/includes/MediaWiki.php(865): MediaWiki->performRequest()
#10 /var/www/mediawiki/includes/MediaWiki.php(515): MediaWiki->main()
#11 /var/www/mediawiki/index.php(42): MediaWiki->run()
#12 {main}
Then I've changed config to this format:
[error] [2d8fa6079f4071a17de8030d] /index.php?title=Especial:Autenticar-se&returnto=P%C3%A1gina+principal ErrorException from line 385 of /var/www/mediawiki/extensions/LdapAuth/src/Auth/PrimaryAuthenticationProvider.php: PHP Warning: Invalid argument supplied for foreach()
![Screenshot from 2019-06-18 11-18-57](https://user-images.githubusercontent.com/1470873/59692278-f14fe380-91ba-11e9-9c9e-31c8d94d228d.png)
#0 /var/www/mediawiki/extensions/LdapAuth/src/Auth/PrimaryAuthenticationProvider.php(385): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /var/www/mediawiki/extensions/LdapAuth/src/Auth/PrimaryAuthenticationProvider.php(110): Shanept\LdapAuth\Auth\PrimaryAuthenticationProvider->connect(Shanept\LdapAuth\Auth\LdapAuthenticationRequest)
#2 /var/www/mediawiki/extensions/LdapAuth/src/Auth/PrimaryAuthenticationProvider.php(88): Shanept\LdapAuth\Auth\PrimaryAuthenticationProvider->beginPrimaryLdapAuthentication(Shanept\LdapAuth\Auth\LdapAuthenticationRequest)
#3 /var/www/mediawiki/includes/auth/AuthManager.php(455): Shanept\LdapAuth\Auth\PrimaryAuthenticationProvider->beginPrimaryAuthentication(array)
#4 /var/www/mediawiki/includes/auth/AuthManager.php(385): MediaWiki\Auth\AuthManager->continueAuthentication(array)
#5 /var/www/mediawiki/includes/specialpage/AuthManagerSpecialPage.php(353): MediaWiki\Auth\AuthManager->beginAuthentication(array, string)
#6 /var/www/mediawiki/includes/specialpage/AuthManagerSpecialPage.php(482): AuthManagerSpecialPage->performAuthenticationStep(string, array)
#7 /var/www/mediawiki/includes/htmlform/HTMLForm.php(672): AuthManagerSpecialPage->handleFormSubmit(array, VFormHTMLForm)
#8 /var/www/mediawiki/includes/specialpage/AuthManagerSpecialPage.php(416): HTMLForm->trySubmit()
#9 /var/www/mediawiki/includes/specialpage/LoginSignupSpecialPage.php(313): AuthManagerSpecialPage->trySubmit()
#10 /var/www/mediawiki/includes/specialpage/SpecialPage.php(571): LoginSignupSpecialPage->execute(NULL)
#11 /var/www/mediawiki/includes/specialpage/SpecialPageFactory.php(575): SpecialPage->run(NULL)
#12 /var/www/mediawiki/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#13 /var/www/mediawiki/includes/MediaWiki.php(865): MediaWiki->performRequest()
#14 /var/www/mediawiki/includes/MediaWiki.php(515): MediaWiki->main()
#15 /var/www/mediawiki/index.php(42): MediaWiki->run()
#16 {main}
It's like the server list is wrong in some way.
We use Nginx and PHP 7.2 FPM
I will try to collect more information about this error.
Thank you
The text was updated successfully, but these errors were encountered: