Jump to content

Project:Support desk

About this board

Welcome to the MediaWiki Support desk. This is a place where you can ask any questions you have about installing, using or administrating the MediaWiki software.

(Read this message in a different language)

See also

Before you post

Post a new question

  1. To help us answer your questions, please indicate which version of MediaWiki you are using, as found on your wiki's Special:Version page:
  2. If possible, add $wgShowExceptionDetails = true;error_reporting( -1 );ini_set( 'display_errors', 1 ); to LocalSettings.php in order to make MediaWiki show more detailed error messages.
  3. Please include the web address (URL) to your wiki if possible. It's often easier for us to identify the source of the problem if we can see the error directly.
  4. To start a new thread, click the box with the text "Start a new topic".

Problema con caracteres especiales / Problem with special characters

3
Mmtorou (talkcontribs)

He querido actualizar mi wiki de la versión 1.34.0 a la versión 1.42.1 y para hacerlo hice una actualización intermedia a la versión 1.39.8 como se recomienda en el manual de actualización. Al hacerlo encuentro que las páginas cuyo nombre contiene tildes, diéresis, ñ o caracteres similares aparecen vacías o sus links de entrada no aparecen en las listas.

Esta es la dirección de mi Wiki:

http://wiki.neotropicos.org/index.php?title=Portada

El problema se puede visualizar en la columna de la izquierda en los links Bibliografía y Topónimos que contienen tildes y dentro del Glosario los vínculos que presentan este problema no aparecen. Sólo aparece la viñeta. Cómo puedo solucionarlo?

____________________________

I wanted to update my wiki from version 1.34.0 to version 1.42.1 and to do so I did an intermediate update to version 1.39.8 as recommended in the update manual. When I did so I found that pages whose names contain accents, umlauts, ñ or similar characters appear empty or their entry links do not appear in the lists.

This is the address of my Wiki:

http://wiki.neotropicos.org/index.php?title=Homepage

The problem can be seen in the left column in the Bibliography and Toponyms links that contain accents and within the Glossary the links that present this problem do not appear. Only the bullet appears. How can I solve it?

Malyacko (talkcontribs)

Cannot reproduce. All accents appear in "Topónimos" and "Bibliografía". Using Firefox 131 on Linux. Do you have broken fonts installed on your system, maybe?

Mmtorou (talkcontribs)

The fonts are installed correctly. The problem is only with links whose name contains accents, "ñ" or similar characters.

Reply to "Problema con caracteres especiales / Problem with special characters"

How to hide 'notice 1' from MediaWiki:Editnotice-0 in VE?

2
Rob Kam (talkcontribs)

I can add a message to editors at MediaWiki:Editnotice-0 but in Visual Editor it's headed by 'notice 1'. How to remove this, to have only the plain message?

Ammarpad (talkcontribs)
Reply to "How to hide 'notice 1' from MediaWiki:Editnotice-0 in VE?"

Extracting the content of a damaged database

2
Mshastchi (talkcontribs)

I am trying to extract the text of the articles from a damaged database. My database does not have users table and other last tables (in alphabetical order) i.e. user, user_autocreate_serial, user_former_groups, user_groups, user_newtalk, user_properties, watchlist, watchlist_expiry. I don't care about the user now, I just want the current text of articles attributed to mediawiki default user. Is there a way to do that?

Bawolff (talkcontribs)
Reply to "Extracting the content of a damaged database"

Mediawiki still says "LocalSettings.php not found"

3
Test1234567890987654321 (talkcontribs)

Even after LocalSettings.php has been put inside the mediawiki-1.42.3 directory it still says that it is not found; why?

Enzzo gabriel (talkcontribs)

The problem with this is that you are not in the right directory. Assuming you are on Linux, it should be in "/var/www/html/wiki". The mediawiki-1.42.3 directory is just the downloaded file, not the actual installation.

Test1234567890987654321 (talkcontribs)

Hello. Thank you for responding to my question. I am not sure which other directory exists other than the one I put LocalSettings.php in, because inside it there is also index.php, mw-config, maintence etc. The reason for it being called mediawiki-1.42.3 is because I didn't rename it after installation.

Reply to "Mediawiki still says "LocalSettings.php not found""

Recent changes always returns HTTP200 instead of HTTP204

2
Cl0vermead0w (talkcontribs)

second post on here in four hours but the recent changes on my wiki only ever returns a HTTP200 when it checks if there has been any recent changes

on other wikis it will return a HTTP204 until there has been a new change that isn't displayed

no clue why this happens so any input is appreciated

Bawolff (talkcontribs)

I assume you mean with the peek url parameter?

It could be due to something with your webserver or proxies between webserver. Hard to say for sure.

Reply to "Recent changes always returns HTTP200 instead of HTTP204"
JonathanReconnect (talkcontribs)

I'm sure I'm not the first to have this issue, but I couldn't find the info I need in FAQs. I'm in the process of setting up a Wiki at knowledge.reconnect.org.uk, I'm currently mostly installing extensions etc. before posting the initial pages that are currently in desktop files that will need editing. All was going well until I attempted another update via http://knowledge.reconnect.org.uk/mw-config/index.php. I got the error message "Your session data was lost! Check your php.ini and make sure session.save_path is set to an appropriate directory." How do I resolve this? I have MediaWiki 1.40.1 installed.

Osnard (talkcontribs)

So, did you

Check your php.ini and make sure session.save_path is set to an appropriate directory.

?

The error message indicates that the session data can not be stored. This may be related to the mentioned configuration. There is also Manual:$wgSessionCacheType which may contain useful information, but I don't think it really applies to the web installer.

JonathanReconnect (talkcontribs)

Hi Osnard, thanks for your quick response. Unfortunately, I don't currently have command line access - but that will get sorted in the next 24 hours. Perhaps I just need to wait for that?! I don't understand why the problem suddenly appeared, I was just setting up the ConfirmEdit Extension... as soon as I can, I'll check php.ini and post what I find here. Hopefully it'll be a solution. Thanks!

JonathanReconnect (talkcontribs)

I got command access and it all seemed OK. My wiki was also all working fine. I then discovered I was making a stupid mistake! I'd set up a bookmark to access my update page at knowledge.reconnect.org.uk/mw-config/index.php but prefixed it with http:// instead of https://...

Special pages not functioning properly

1
Cl0vermead0w (talkcontribs)

my special pages have a different format to the default and i have no clue why

e.g. Special:EmailUser?wpTarget=TargetUsername does not work, but Special:EmailUser/TargetUsername does work

idk if it's relevant but below is the path setup

$wgScriptPath = "";

$wgScriptExtension = "$wgScriptPath/index.php";

$wgArticlePath = "/wiki/$1";

$wgUsePathInfo = true;


foreach ($actions as $action) {

  $wgActionPaths[$action] = "$wgArticlePath/$action";

}

$wgActionPaths["view"] = "/wiki/$1";

$wgActionPaths["rollback"] = "/index.php?title=$1&action=rollback";

Reply to "Special pages not functioning properly"

Categories broken after updating to 1.42.3.

1
Laurvin (talkcontribs)

After updating from 1.39 to 1.42.3 all pages with categories have the same problem:

When I open the page in the Visual Editor the existing categories are shown in the category box at the bottom of the page as red links with these urls; Index.php?title=Category:category name].

If I leave it like that then after saving the page that url shows up at the bottom of the page text and the page no longer has any categories.

If I use the Source Editor instead everything is fine and the category shows up between double brackets.

The steps I took to update:

I uploaded the 1.42.3 zip to the server, had it unzipped to a new directory. I downloaded the latest versions for LabeledSectionTransclusion and Popups and uploaded those to the Extensions folder in the new directory.

I renamed the 1.39 folder to another name and then renamed the 1.42.3 folder to the regular wiki name. Then I ran the update script.

I opened the wiki main page and then saw I forgot to copy the images directory to the new folder, which is what I did next. I then reloaded the main page and everything looked fine.

The first time I edited a page I didn't notice the error at the bottom but after saving I saw what happened and from then on it became clear this is happening every time now.

I've tested by disabling all the extensions except for the editors to see if any of those could be the culprit but I keep getting the same issue.

These are the normally enabled extensions:

wfLoadExtension( 'CodeEditor' );

wfLoadExtension( 'LabeledSectionTransclusion' );

wfLoadExtension( 'PageImages' );

wfLoadExtension( 'ParserFunctions' );

wfLoadExtension( 'Popups' );

wfLoadExtension( 'TextExtracts' );

wfLoadExtension( 'VisualEditor' );

wfLoadExtension( 'WikiEditor' );

I did find the following in the release notes for 1.42:

ParserOutput::getCategories(), deprecated in 1.40, has been removed. You should use ::getCategoryNames() and ::getCategorySortKey() instead.

Maybe that is related but I don't understand how it could be as all the other extensions except for the two mentioned above come bundled with the latest version and should be compatible, one would think.

Could it be something needs to be added or removed from LocalSettings?

I'd love to know what the fix for this is as I used categories on all pages.

Thanks!

Reply to "Categories broken after updating to 1.42.3."

Sitename overlaps with search bar

2
Craighead County History (talkcontribs)

Hello! My wiki's name is quite long (Craighead County History). The sitename overlaps with the search bar. How can I fix this? This wiki is hosted by Miraheze, if that information is helpful.

Taavi (talkcontribs)

You should contact Miraheze about issues on wikis hosted by them.

Reply to "Sitename overlaps with search bar"

Cannot login with LDAP

12
Techietubby (talkcontribs)

I have built a Mediawiki 1.42.3 on the latest version of Rocky9 and imported my database from a previous version. Everything works except (Open)LDAP login which returns an error when I try to login. The strange thing is that the error is different if I clear my cookie cash. I know that LDAP is working because I can login at the OS level using sssd. Is there any way to debug this as the logs give me no clue?

These are my LocalSettings.php LDAP settings:

######### LDAP ########

#######################

# LDAP Extensions

######################

wfLoadExtensions( [

        'PluggableAuth',

        'Auth_remoteuser',

        'LDAPProvider',

        'LDAPAuthentication2',

        'LDAPAuthorization',

        'LDAPUserInfo'

] );

$LDAPAuthorizationAutoAuthRemoteUserStringParser = 'username-at-domain';

$LDAPAuthentication2UsernameNormalizer = 'strtolower';

$LDAPAuthentication2AllowLocalLogin = true;

$wgAuthRemoteuserAllowUserSwitch = true;

$wgPluggableAuth_EnableLocalLogin = true;

$wgAuthRemoteuserUserName = function() {

        $user = '';

        if( isset( $_SERVER[ 'REMOTE_USER' ] ) ) {

                $user = strtolower( $_SERVER[ 'REMOTE_USER' ] );

        }

        return $user;

};

$LDAPProviderDomainConfigProvider = function() {

        $config = [

                'acmecorp.com' => [

                        'connection' => [

                                "server" => "auth.acmecorp.com",

                                "user": "cn=readonlyroot,dc=acme,dc=corp",

                                "pass": "PASSWD",

                                "options" => [

                                        "LDAP_OPT_DEREF" => 1

                                ],

                                "basedn" => "dc=acme,dc=corp",

                                "groupbasedn" => "ou=group,dc=acme,dc=corp",

                                "userbasedn" => "ou=people,dc=acme,dc=corp",

                                "searchattribute" => "uid",

                                "usernameattribute" => "uid",

                                "realnameattribute" => "fullname",

                                "emailattribute" => "mail",

                                "grouprequest" => "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\GroupMember::factory"

                        ],

                        'authorization' => [

                                'rules' => [

                                        'groups' => [

                                                'required' => [

                                                        'cn=readonlyroot,dc=acme,dc=corp'

                                                ]

                                        ]

                                ]

                        ],

                        'userinfo' => [

                                'attributes-map' => [

                                        'email' => 'mail',

                                        'realname' => 'fullname'

                                ]

                        ]

                ]

        ];

        return new \MediaWiki\Extension\LDAPProvider\DomainConfigProvider\InlinePHPArray( $config );

};

# In any case we need to specify LDAP domain configs

$LDAPProviderDomainConfigs = "$IP/../ldapprovider.json";

# Local login is enabled

$wgPluggableAuth_EnableLocalLogin = true;

$LDAPAuthentication2AllowLocalLogin = true;

$wgPluggableAuth_Class = "MediaWiki\\Extension\\LDAPAuthentication2\\PluggableAuth";

$wgPluggableAuth_ButtonLabel = "Log In (PluggableAuth)";

$wgPluggableAuth_Config['Log In (auth1.acmecorp.com)'] = [

    'plugin' => 'LDAPAuthentication2',

    'data' => [

        'domain' => 'acmecorp.com'

    ]

];

# LDAP

wfLoadExtension( 'PluggableAuth' );

$wgPluggableAuth_EnableAutoLogin = false; #if true, disables the logout option

$wgPluggableAuth_EnableLocalLogin = true;

wfLoadExtension( 'LDAPProvider' );

$LDAPProviderDomainConfigs = "$IP/ldapprovider.json";

wfLoadExtension( 'LDAPAuthentication2' );

$LDAPAuthentication2AllowLocalLogin = true;

### EDIT EDIT ENABLE DEBUG LOGS

/**

* The debug log file must never be publicly accessible because it

* contains private data. But ensure that the directory is writeable by the

* PHP script running within your Web server.

* The filename is with the database name of the wiki.

*/

$wgDebugLogFile = "/var/log/mediawiki/debug-{$wgDBname}.log";

### ALSO turn on LDAP debug

$wgLDAPDebug = 99;

$wgDebugLogGroups['ldap'] = '/var/log/mediawiki/debug-ldap.log';

$wgShowExceptionDetails = true;

#$wgRevokePermissions['user']['createaccount'] = true;

# Prevent new user registrations except by sysops

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

## Forces user to login to view Wiki

## # The following permissions were set based on your choice in the installer

## $wgGroupPermissions['*']['createaccount'] = false;

## $wgGroupPermissions['*']['edit'] = false;

## $wgGroupPermissions['*']['read'] = false;

Techietubby (talkcontribs)

I have also tried using ldapprovider.json and that doesn't help either?

{

  "LDAP": {

    "connection": {

      "server": "auth.acme.com",

      "user": "cn=readonlyroot,dc=acme,dc=corp",

      "pass": "PASSWD",

      "port": 636,

      "enctype": "tls",

      "options": {

        "LDAP_OPT_DEREF": 1

      },

      "basedn": "dc=acme,dc=corp",

      "userbasedn": "ou=people,dc=acme,dc=corp",

      "groupbasedn": "ou=group,dc=acme,dc=corp",

      "searchattribute": "uid",

      "searchstring": "uid=USER-NAME,ou=people,dc=acme,dc=corp",

      "usernameattribute": "uid",

                        "realnameattribute": "cn",

                        "emailattribute": "mail"

    },

    "userinfo": {

      "attributes-map": {

        "email": "mail",

        "realname": "cn",

        "nickname": "uid"

      }

    }

  }

}

Osnard (talkcontribs)

[...] The strange thing is that the error is different if I clear my cookie cash. [...]

What exactly is the error?

Please, enable debug logging and share the (redacted) results.

Techietubby (talkcontribs)

MediaWiki internal error.

Original exception: [Zxt-iIUMHHwirGji-KznVQAAAMA] /wiki/index.php?title=Special:UserLogin&returnto=Development+Info+Wiki TypeError: Cannot assign null to property MediaWiki\Extension\Auth_remoteuser\UserNameSessionProvider::$remoteToken of type string

Backtrace:

from /var/www/html/mediawiki-1.42.3/extensions/Auth_remoteuser/src/UserNameSessionProvider.php(793)

#0 /var/www/html/mediawiki-1.42.3/includes/session/SessionBackend.php(756): MediaWiki\Extension\Auth_remoteuser\UserNameSessionProvider->persistSession()

#1 /var/www/html/mediawiki-1.42.3/includes/session/SessionBackend.php(670): MediaWiki\Session\SessionBackend->save()

#2 /var/www/html/mediawiki-1.42.3/includes/session/SessionBackend.php(346): MediaWiki\Session\SessionBackend->autosave()

#3 /var/www/html/mediawiki-1.42.3/includes/session/Session.php(133): MediaWiki\Session\SessionBackend->persist()

#4 /var/www/html/mediawiki-1.42.3/includes/specialpage/LoginSignupSpecialPage.php(249): MediaWiki\Session\Session->persist()

#5 /var/www/html/mediawiki-1.42.3/includes/specialpage/SpecialPage.php(719): MediaWiki\SpecialPage\LoginSignupSpecialPage->execute()

#6 /var/www/html/mediawiki-1.42.3/includes/specialpage/SpecialPageFactory.php(1669): MediaWiki\SpecialPage\SpecialPage->run()

#7 /var/www/html/mediawiki-1.42.3/includes/actions/ActionEntryPoint.php(504): MediaWiki\SpecialPage\SpecialPageFactory->executePath()

#8 /var/www/html/mediawiki-1.42.3/includes/actions/ActionEntryPoint.php(145): MediaWiki\Actions\ActionEntryPoint->performRequest()

#9 /var/www/html/mediawiki-1.42.3/includes/MediaWikiEntryPoint.php(199): MediaWiki\Actions\ActionEntryPoint->execute()

#10 /var/www/html/mediawiki-1.42.3/index.php(58): MediaWiki\MediaWikiEntryPoint->run()

#11 {main}

Exception caught inside exception handler: [Zxt-iIUMHHwirGji-KznVQAAAMA] /wiki/index.php?title=Special:UserLogin&returnto=Development+Info+Wiki TypeError: Cannot assign null to property MediaWiki\Extension\Auth_remoteuser\UserNameSessionProvider::$remoteToken of type string

Backtrace:

from /var/www/html/mediawiki-1.42.3/extensions/Auth_remoteuser/src/UserNameSessionProvider.php(793)

#0 /var/www/html/mediawiki-1.42.3/includes/session/SessionBackend.php(756): MediaWiki\Extension\Auth_remoteuser\UserNameSessionProvider->persistSession()

#1 /var/www/html/mediawiki-1.42.3/includes/session/SessionBackend.php(659): MediaWiki\Session\SessionBackend->save()

#2 [internal function]: MediaWiki\Session\SessionBackend->MediaWiki\Session\{closure}()

#3 /var/www/html/mediawiki-1.42.3/vendor/wikimedia/scoped-callback/src/ScopedCallback.php(102): call_user_func_array()

#4 /var/www/html/mediawiki-1.42.3/vendor/wikimedia/scoped-callback/src/ScopedCallback.php(58): Wikimedia\ScopedCallback->__destruct()

#5 /var/www/html/mediawiki-1.42.3/includes/session/SessionManager.php(951): Wikimedia\ScopedCallback::consume()

#6 /var/www/html/mediawiki-1.42.3/includes/session/SessionManager.php(268): MediaWiki\Session\SessionManager->getSessionFromInfo()

#7 /var/www/html/mediawiki-1.42.3/includes/Request/WebRequest.php(864): MediaWiki\Session\SessionManager->getSessionById()

#8 /var/www/html/mediawiki-1.42.3/includes/skins/Skin.php(1721): MediaWiki\Request\WebRequest->getSession()

#9 /var/www/html/mediawiki-1.42.3/includes/skins/Skin.php(1730): Skin->hideNewTalkMessagesForCurrentSession()

#10 /var/www/html/mediawiki-1.42.3/includes/skins/SkinMustache.php(137): Skin->getNewtalks()

#11 /var/www/html/mediawiki-1.42.3/skins/Vector/includes/SkinVectorLegacy.php(161): SkinMustache->getTemplateData()

#12 /var/www/html/mediawiki-1.42.3/includes/skins/SkinMustache.php(92): MediaWiki\Skins\Vector\SkinVectorLegacy->getTemplateData()

#13 /var/www/html/mediawiki-1.42.3/includes/skins/SkinTemplate.php(176): SkinMustache->generateHTML()

#14 /var/www/html/mediawiki-1.42.3/includes/Output/OutputPage.php(3004): SkinTemplate->outputPage()

#15 /var/www/html/mediawiki-1.42.3/includes/exception/MWExceptionRenderer.php(189): MediaWiki\Output\OutputPage->output()

#16 /var/www/html/mediawiki-1.42.3/includes/exception/MWExceptionRenderer.php(106): MWExceptionRenderer::reportHTML()

#17 /var/www/html/mediawiki-1.42.3/includes/exception/MWExceptionHandler.php(133): MWExceptionRenderer::output()

#18 /var/www/html/mediawiki-1.42.3/includes/exception/MWExceptionHandler.php(237): MWExceptionHandler::report()

#19 /var/www/html/mediawiki-1.42.3/includes/MediaWikiEntryPoint.php(221): MWExceptionHandler::handleException()

#20 /var/www/html/mediawiki-1.42.3/includes/actions/ActionEntryPoint.php(82): MediaWiki\MediaWikiEntryPoint->handleTopLevelError()

#21 /var/www/html/mediawiki-1.42.3/includes/MediaWikiEntryPoint.php(205): MediaWiki\Actions\ActionEntryPoint->handleTopLevelError()

#22 /var/www/html/mediawiki-1.42.3/index.php(58): MediaWiki\MediaWikiEntryPoint->run()

#23 {main}

Techietubby (talkcontribs)

I enabled debugging as follows but couldn't see anything LDAP related.


$wgDebugLogFile = "/var/log/mediawiki/debug-{$wgDBname}.log";

### ALSO turn on LDAP debug

$wgLDAPDebug = 99;

$wgDebugLogGroups['ldap'] = '/var/log/mediawiki/debug-ldap.log';

$wgShowExceptionDetails = true;

Techietubby (talkcontribs)

Stupid question: Which directory should this be in? /var/www/html/mediawiki-1.42.3 or /var/www/html ?

$LDAPProviderDomainConfigs = "$IP/../ldapprovider.json";

Osnard (talkcontribs)

You are using Extension:Auth_remoteuser. Can you confirm you have set up the webserver in a way it provides a $_SERVER['REMOTE_USER']? Something like Kerberos authentication?

Techietubby (talkcontribs)

I have not done any browser configuration other than to create the ssl.conf and to install the SSL certs as I cannot find any instructions for this, so any advice would be gratefully received .

I built this server from scratch and imported the database from a very old server that runs Centos-7 and has never been updated. It is using the original LDAPAUTH plugin and I can only see the changes that were made to LocalSettings.php. Is there somewhere else I should look?

Both servers are authenticating to an OpenLDAP server.

Osnard (talkcontribs)

The old Extension:LDAP_Authentication supported implicit authentication via . But it did not require it. I can not tell if it was used in your old set up (maybe you can share a redacted version of your old configuration here). If not, you don't need Extension:Auth_remoteuser. If it was, you need to configure your webserver in a way it performs the Kerberos authentication and hands over the authenticated username to the wiki application (usually this is done in the [$_SERVER['REMOTE_USER']] variable). It highly depends on your webserver (Apache, Nginx, IIS) how this needs to be done.

Techietubby (talkcontribs)

Hi,

The old v1.34.2 server used:

$wgAuth = new LdapAuthenticationPlugin(); $wgAuthManagerAutoConfig['primaryauth'] += [

  LdapPrimaryAuthenticationProvider::class => [
      'class' => LdapPrimaryAuthenticationProvider::class,
      'args' => [[
             'authoritative' => true, // don't allow local non-LDAP accounts
         ]],
      'sort' => 50, // must be smaller than local pw provider
  ],

];

$wgLDAPDomainNames = array("ACMELDAP"); $wgLDAPServerNames = array("ACMELDAP"=>"auth.ACMEcorp.com");

$wgLDAPServerNames = array("ACMELDAP"=>"ldapserver.ACMEcorp.com");

$wgLDAPUseLocal = false;

$wgLDAPEncryptionType = array("ACMELDAP"=>"ssl"); $wgLDAPEncryptionType = array("ACMELDAP"=>"tls", "ACMELDAP"=>"ssl", "ACMELDAP"=>"clear", );

$wgLDAPEncryptionType = array("ACMELDAP"=>"ssl"); $wgLDAPOptions = array("ACMELDAP" => array( LDAP_OPT_DEREF, 1 )); $wgLDAPPort = array("ACMELDAP"=>636);

$wgLDAPSearchStrings = array("testLDAPdomain"=>"uid=USER-NAME,ou=people,dc=ACME,dc=corp");

$wgLDAPSearchStrings = array("ACMELDAP"=>"uid=USER-NAME,ou=people,dc=ACME,dc=corp"); $wgLDAPSearchAttributes = array("ACMELDAP"=>"uid"); $wgLDAPBaseDNs = array("ACMELDAP"=>"dc=ACME,dc=corp"); $wgLDAPGroupBaseDNs = array("ACMELDAP"=>"ou=group,dc=ACME,dc=corp"); $wgLDAPUserBaseDNs = array("ACMELDAP"=>"ou=people,dc=ACME,dc=corp"); $wgLDAPProxyAgent = array("ACMELDAP" => "cn=readonlyroot,dc=ACME,dc=corp"); $wgLDAPProxyAgentPassword = array("ACMELDAP" => "PASSWD"); $wgGroupPermissions['*']['createaccount'] = false; $wgGroupPermissions['*']['autocreateaccount'] = true;

Techietubby (talkcontribs)

I have double-checked and I have enabled the extra plugin:

#######################

# LDAP Extensions

######################

wfLoadExtensions( [

        'PluggableAuth',

        'Auth_remoteuser',

        'LDAPProvider',

        'LDAPAuthentication2',

        'LDAPAuthorization',

        'LDAPUserInfo'

] );

$LDAPAuthorizationAutoAuthRemoteUserStringParser = 'username-at-domain';

$LDAPAuthentication2UsernameNormalizer = 'strtolower';

$LDAPAuthentication2AllowLocalLogin = true;

$wgAuthRemoteuserAllowUserSwitch = true;

$wgPluggableAuth_EnableLocalLogin = true;

# $wgLDAPProxyAgent = array("LDAP" => "cn=readonlyroot,dc=acme,dc=corp");

$wgLDAPProxyAgentPassword = array("LDAP" => "PASSWD");

# In any case we need to specify LDAP domain configs

$LDAPProviderDomainConfigs = "/var/www/html/mediawiki-1.42.3/ldapprovider.json";

#$LDAPProviderDomainConfigs = "$IP/../ldapprovider.json";

## Prevent users from adding accounts

#$wgRevokePermissions['user']['createaccount'] = true;

## Prevent new user registrations except by sysops

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

## Forces user to login to view Wiki

## # The following permissions were set based on your choice in the installer

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

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

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

I have tested this but still it doesn't work and I see no LDAP messages in the logs. Do I have to configure Apache in some way?

Reply to "Cannot login with LDAP"