Project:Support desk

Jump to navigation Jump to search

About this board

Welcome to's Support desk, where you can ask MediaWiki questions!

There are also other places where to ask :

Before you post

Post a new question

  1. To help us answer your questions, please always indicate which versions you are using (reported by your wiki's Special:Version page):
    • MediaWiki
    • PHP
    • Database
  2. Please include the URL of your wiki unless you absolutely can't. It's often a lot easier for us to identify the source of the problem if we can look for ourselves.
  3. To start a new thread, click "Start a new topic".
Previous page history was archived for backup purposes at Project:Support_desk/old on 2015-07-30.
Other languages: English  العربية čeština Esperanto français 日本語 中文
Tviv54 (talkcontribs)

I have installed mediawiki 1.33.1 and working fine without LDAP. I try to do login using LDAP authentication. I have installed Auth_remoteuser, LDAPAuthentication2, LDAPAuthorization, LDAPProvider, LDAPUserInfo and PluggableAuth.   Please help me to do the configuration and autoauth using LDAP.

Here are the my Virtual host configuration details

<VirtualHost *:9004>
    ServerName localhost
    ServerAlias localhost
    DocumentRoot "${INSTALL_DIR}/www/mediawiki-1-33-1" 
    <Directory "${INSTALL_DIR}/www/mediawiki-1-33-1">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
    AuthName "My Intranet"
    AuthType SSPI 
    SSPIAuth On 
    SSPIAuthoritative On
    SSPIDomain MyDomainName
    SSPIOmitDomain On
    SSPIOfferBasic On
    #SSPIBasicPreferred On
    #SSPIofferSSPI On
    require valid-user
    require user "NT AUTHORITY\ANONYMOUS LOGON" denied 

Here are the my Localsettings details

       $wgCookieSecure = false; 
       wfLoadExtensions([  'PluggableAuth',
  $LDAPAuthorizationAutoAuthRemoteUserStringParser = 'username-at-domain';
  $LDAPAuthentication2UsernameNormalizer = 'strtolower';
  $LDAPAuthentication2AllowLocalLogin = false;
  $wgAuthRemoteuserAllowUserSwitch = true;
  $wgPluggableAuth_EnableLocalLogin = false;
 $wgAuthRemoteuserUserName = function() {
 $user = '';
 if( isset( $_SERVER[ 'REMOTE_USER' ] ) ) {
    echo $user = strtolower( $_SERVER[ 'REMOTE_USER' ] ); // Returns my remote user name
 return $user;
$LDAPProviderDomainConfigProvider = function() {
$config = [
 'company.local' => [
   'connection' => [
      "server" => "corp.tcc.inet",
      "options" => [
            "LDAP_OPT_DEREF" => 1
      "basedn" => "o=Company",
      "groupbasedn" => "o=Company",
      "userbasedn" => "o=Company",
      "searchattribute" => "uid",
      "usernameattribute" => "uid",
      "realnameattribute" => "fullname",
      "emailattribute" => "mail",
      "grouprequest" => "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\GroupMember::factory"
  'authorization' => [
     'rules' => [
        'groups' => [
           'required' => [
 'userinfo' => [
        'attributes-map' => [
           'email' => 'mail',
           'realname' => 'fullname'
return new \MediaWiki\Extension\LDAPProvider\DomainConfigProvider\InlinePHPArray( $config );
Kking01 (talkcontribs)

Were you able to get this to work? I am having the same issue with the config. I was able to get it to return my full name from the table, but still wouldn't connect to Active Directory to login.

MarkAHershberger (talkcontribs)

@Kking01 what have you tried? Does your single sign on work outside of MW?

@Tviv54 How does your current configuration behave?

Kking01 (talkcontribs)

@MarkAHershberger Yes All single sign on works. We have quite a few other things that use LDAP and all work fine. This is an older instance of Mediawiki that I have upgraded through the years. I just pushed it from 1.29 to 1.33, and all plugins functioned correctly except for the LdapAuthentication. This is why I switched to use the LdapHub migration. Way more involved as it uses 6 plugins instead of just the one. I just maybe doing something wrong.

Tviv54 (talkcontribs)

$_SERVER[ 'REMOTE_USER' ] - Return my name from the Active directory.

My current configuration is not working properly. I tried with my windows user credential but Login attempt failed and returns "There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form."

Reply to "Auto authentication using LDAP"

After upgrading to 1.33.1, the "l10n_cache" table is 783M, what is the problem?

3 (talkcontribs)

I just upgraded my website from 1.27.1 to 1.33.1, then size of the database reached over 800M, but my site is definitely not so big, I just checked the "l10n_cache" table alone is 783M, so what is the function of this table? how to reduce it?

Moonriverzf (talkcontribs)

Manual:L10n cache table

I found this link, so the content within this table could be deleted manually, without effecting the execution of the whole database?

Ciencia Al Poder (talkcontribs)

Yes, you can truncate this table, and the contents will be regenerated.

Reply to "After upgrading to 1.33.1, the "l10n_cache" table is 783M, what is the problem?"
Seehausen (talkcontribs)

I have a question: Is it possible to show the recent changes only for the current page and not for the subpages and how you do it?

I tried the feature Recent Changes but it shows all of the changes in the whole wiki and the related changes show just the changes of links on that page.

I just want to have a recent activity feed for changes that occur on the page the user is on and neither for the whole wiki nor for links or subpages. I would appreciate any help.

Best regards.

Gustave London (talkcontribs)

You add this page in the your watchlist.

Seehausen (talkcontribs)

No, i want in general to show a recent changes feed just of the current page in the upper part on the current page and not user-dependent.

Let´s say i want to include {{ Special:RecentChanges }} , but just showing the recent changes section of the page where i included it and not showing recent changes of the whole wiki.

Is that possible somehow?

Ciencia Al Poder (talkcontribs)

You want to show the page history, not recent changes.

There's no magic word to do that. I don't know if there's an extension to do that. With JavaScript, you can query the API:Revisions to get the info you want and insert it anywhere on the page. Of course, that needs coding skills.

Reply to "Show recent page changes on a page"

Restrict $wgWhitelistRead by group membership possible?

6 (talkcontribs)

I have created a group that can only edit and view a single page. The page call is enabled by $wgWhitelistRead. This also allows anonymous users to read the page. Is it possible to create an if query for registered users in localsettings.php, so that only registered users see the website? Or is there a better way for my purpose?

Ciencia Al Poder (talkcontribs)

I think this can only be done with Extension:Lockdown. However, have in mind that MediaWiki hasn't been built with view restrictions in mind and someone could potentially leak the contents of such hidden pages with various methods.

MarkAHershberger (talkcontribs)

Is it possible to create an if query for registered users in localsettings.php, so that only registered users see the website? Or is there a better way for my purpose?

Yes, see $wgGroupPermissions and, specifically, restricting the "read" permission to the "user" group.
Ciencia Al Poder (talkcontribs)

But what the op wants is a bit more complicated: nobody can see anything, and registered users can edit and read 1 page, where admins (I suppose) have no restrictions. Or at least that's what I understood. (talkcontribs)

Yes, that's exactly what I meant.

Ciencia Al Poder (talkcontribs)

You probably want to use a different software for this. I don't think MediaWiki is suitable for this purpose.

Reply to "Restrict $wgWhitelistRead by group membership possible?"
Omg nginx (talkcontribs)


I've set up a MediWiki Family, including the StopForumSpam extension.

Two questions

- Do I need to run the updateBlacklist.php script for the extension to Work?

- When I run the script, it outputs



Took 2.4573900699615 seconds

-> After the execution, I would expect some entries in the ipblocks table, but it is empty. Is this correct (is my expectation wrong) or did I do something wrong?



Ciencia Al Poder (talkcontribs)

No. The list is saved in object cache, those IP aren't immediately blocked. Only when they try to edit.

Omg nginx (talkcontribs)

Ok, thank you.

Does it makes sense to share the objectcache table for a wiki family? Or will it mess things up?

Ciencia Al Poder (talkcontribs)

It's possible to share it, all keys should prefix the database domain id (usually dbname) except global keys like this one that don't.

With several wikis, it's better if you use memcached or redis instead of the database as cache.

Reply to "updateBlacklist.php - Really done?"
2610S (talkcontribs)

I get this error when trying to change email, or confirm email.

What should I do ?

MarkAHershberger (talkcontribs)
2610S (talkcontribs)

@MarkAHershberger I get a long page with details that I don't know what to do about it.

I'am copying the page (XXX instead of private information)

[Xcub4krQOu4AATR58dUAAAAM] /index.php?title=XXX MWException from line 4237 of /homepages/32/XXX/htdocs/XXX/mediawiki-1.32.2/includes/user/User.php: CAS update failed on user_touched. The version of the user to be saved is older than the current version.


#0 /homepages/32/XXX/htdocs/XXX/mediawiki-1.32.2/includes/libs/rdbms/database/Database.php(3815): User->{closure}(Wikimedia\Rdbms\DatabaseSqlite, string)

#1 /homepages/32/XXX/htdocs/XXX/mediawiki-1.32.2/includes/user/User.php(4250): Wikimedia\Rdbms\Database->doAtomicSection(string, Closure)

#2 /homepages/32/XXX/htdocs/XXX/mediawiki-1.32.2/includes/user/User.php(4692): User->saveSettings()

#3 /homepages/32/XXX/htdocs/XXX/mediawiki-1.32.2/includes/user/User.php(3123): User->sendConfirmationMail(string)

#4 /homepages/32/XXX/htdocs/XXX/mediawiki-1.32.2/includes/specials/SpecialChangeEmail.php(176): User->setEmailWithConfirmation(string)

#5 /homepages/32/XXX/htdocs/XXX/mediawiki-1.32.2/includes/specials/SpecialChangeEmail.php(127): SpecialChangeEmail->attemptChange(User, string)

#6 /homepages/32/XXX/htdocs/XXX/mediawiki-1.32.2/includes/htmlform/HTMLForm.php(665): SpecialChangeEmail->onSubmit(array, OOUIHTMLForm)

#7 /homepages/32/XXX/htdocs/XXX/mediawiki-1.32.2/includes/htmlform/HTMLForm.php(557): HTMLForm->trySubmit()

#8 /homepages/32/XXX/htdocs/XXX/mediawiki-1.32.2/includes/htmlform/HTMLForm.php(572): HTMLForm->tryAuthorizedSubmit()

#9 /homepages/32/XXX/htdocs/XXX/mediawiki-1.32.2/includes/specialpage/FormSpecialPage.php(184): HTMLForm->show()

#10 /homepages/32/XXX/htdocs/XXX/mediawiki-1.32.2/includes/specials/SpecialChangeEmail.php(61): FormSpecialPage->execute(NULL)

#11 /homepages/32/XXX/htdocs/XXX/mediawiki-1.32.2/includes/specialpage/SpecialPage.php(569): SpecialChangeEmail->execute(NULL)

#12 /homepages/32/XXX/htdocs/XXX/mediawiki-1.32.2/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)

#13 /homepages/32/XXX/htdocs/XXX/mediawiki-1.32.2/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)

#14 /homepages/32/XXX/htdocs/XXX/mediawiki-1.32.2/includes/MediaWiki.php(860): MediaWiki->performRequest()

#15 /homepages/32/XXX/htdocs/XXX/mediawiki-1.32.2/includes/MediaWiki.php(517): MediaWiki->main()

#16 /homepages/32/XXX/htdocs/XXX/mediawiki-1.32.2/index.php(42): MediaWiki->run()

#17 {main}

Debug data:

  • Start request POST /index.php?title=XXXHTTP HEADERS:HOST: XXX.XXX.comCONTENT-LENGTH: 454CACHE-CONTROL: max-age=0ORIGIN: http://XXX.XXX.comUPGRADE-INSECURE-REQUESTS: 1CONTENT-TYPE: application/x-www-form-urlencodedUSER-AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.2804.97 Safari/537.36ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/png,image/apng,*/*;q=0.8,application/signed-exchange;v=b3REFERER: gzip, deflateACCEPT-LANGUAGE: en-UK,en;q=0.9,en-US;q=0.8,en;q=0.7COOKIE: my_wiki_session=XXX; my_wikiUserID=1; my_wikiUserName=XXX; my_wikiToken=XXX
  • [caches] cluster: EmptyBagOStuff, WAN: mediawiki-main-default, stash: db-replicated, message: SqlBagOStuff, session: SqlBagOStuff
  • [caches] LocalisationCache: using store LCStoreDB
  • [DBConnection] Wikimedia\Rdbms\LoadBalancer::openConnection: calling initLB() before first connection.
  • [DBReplication] Cannot use ChronologyProtector with EmptyBagOStuff.
  • [DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: using request info {"IPAddress": "XXX.XX.XXX.XXX","UserAgent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/78.0.2804.97 Safari\/537.36","ChronologyProtection": false,"ChronologyPositionIndex": 0,"ChronologyClientId": null}
  • [DBConnection] Wikimedia\Rdbms\LoadBalancer::openLocalConnection: connected to database 0 at 'localhost'.
  • User: cache miss for user 1
  • [ContentHandler] Created handler for wikitext: WikitextContentHandler
  • MediaWikiGadgetsDefinitionRepo::fetchStructuredList: MediaWiki:Gadgets-definition parsed, cache entry should be updated
  • User: loading options for user 1 from database.
  • [SQLBagOStuff] SqlBagOStuff: connecting to [unknown]
  • [SQLBagOStuff] Connection SQLite 3.28.0 will be used for SqlBagOStuff
  • User::getBlockedStatus: checking...
  • User: loading options for user 1 from override cache.
  • [MessageCache] MessageCache::load: Loading he... local cache is empty, global cache is expired/volatile, loading from database
  • Unstubbing $wgParser on call of $wgParser::firstCallInit from MessageCache->transform
  • Parser: using preprocessor: Preprocessor_DOM
  • Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct
  • User::getBlockedStatus: checking...
  • [authentication] MediaWiki\Auth\AuthManager::securitySensitiveOperationStatus: Checking ChangeEmail
  • [authentication] MediaWiki\Auth\AuthManager::securitySensitiveOperationStatus: ChangeEmail is ok for 'XXX'
  • [objectcache] Rejected set() for my_wiki:messages-big:0169d77dc450e5d68ffdfade720dc0be:Changeemail-text due to pending writes.
  • [MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is expired/volatile, loading from database
  • [objectcache] Rejected set() for my_wiki:messages-big:f6c4f725a607bfe8fa0cf0c05ee4f470:Changeemail-text/en due to pending writes.
  • UserMailer::send: sending mail to =?UTF-8?Q?XXX?= <XX@XXXXX.COM>
  • Sending mail via internal mail() function
  • [DBQuery] startAtomic: entering level 0 (User::saveSettings)
  • [preferences] CAS update failed on user_touched for user ID '1' (replica read)
  • [DBQuery] cancelAtomic: canceling level 0 (User::saveSettings)
  • [exception] [Xcub4krQOu4AATR58dUAAAAM] /index.php?title=XXX MWException from line 4237 of /homepages/32/XXX/htdocs/XXX/mediawiki-1.32.2/includes/user/User.php: CAS update failed on user_touched. The version of the user to be saved is older than the current version.
  • User: loading options for user 1 from database.
  • User: loading options for user 1 from database.
  • User: loading options for user 1 from database.
Ciencia Al Poder (talkcontribs)

You can try to see the user_touched field of the user table and see if it has some weird value, like a date in the future, or is blank, since this can cause this issue.

2610S (talkcontribs)
Ciencia Al Poder (talkcontribs)

Create a new user, see what is its user_touched field, and update the user that's failing with that value.

Reply to "MWException error"

Transcluding specific logs from Recent Changes

Vishkujo (talkcontribs)

Is it possible to filter Recent Changes to only show a specific log? I want a forum feed displaying on my main page (using Extension:WikiForum) but it creates a forum log in the Special namespace (-1) rather than its own namespace. It would be better if I could just transclude the log page instead but it doesn't seem possible.

Reply to "Transcluding specific logs from Recent Changes"
Summary by MarkAHershberger


RonnieV (talkcontribs)
Ablum010777 (talkcontribs)

I have two issues concerning the Collection Extension:

1.) Images are not included in the PDF output

2.) Some of our wikis are can be reached via an internal and an external URL. When accessing a Wiki via the external URL the Collection extension doesn't work at all.

MarkAHershberger (talkcontribs)

It shoulds like the process (mwlib) that creates the PDFs is having trouble connecting to the wiki. Do you have any logs from the mwlib process?

Ablum010777 (talkcontribs)

This is an excerpt from mwcache.txt:

MarkAHershberger (talkcontribs)

From that file, the problem is clearly that the process cannot access the wiki. There are several ERR: <urlopen error [Errno 111] Connection refused> to be found.

Check your firewall, make sure you can get to the wiki from the command line, etc.

Reply to "Collection Extension: two issues"

Shared users unable to log into other wikis

Veryarcanepotatoe (talkcontribs)

Does anyone here know how to set up a shared user database?

I have one database acting as the master, and both wikis are creating users in there that work to log into themselves, but the users created in one of the wikis can not log into the other.

I'm using the same dbuser to access the database from both wikis.

if the password is correct, I get an error saying automatic user creation fails. If it is wrong, it tells me I have a bad username/password.

Both wikis list all users but only the ones created in that wiki can log onto it.

I'm so stumped.

MarkAHershberger (talkcontribs)

What do you have in your LocalSettings.php to set up shared users? What version of MediaWiki are you using?

Veryarcanepotatoe (talkcontribs)

I'm using a shared database belonging to one of the wiki's.

Mediawiki 1.33 running on mariaDB 10.4

The users are created in the right place both wiki A and wiki B create users in the user table of wiki A

Displayed on the special:allusers page on either wiki will be all of the users regardless of where they were created, listed as users on both wiki.

The user table for wiki B has only the initial user in it (this user is common between both and has the same password set initially. it is the only one that works on both wikis)

The user table for wiki A contains all users created in either wiki:

When a user created in wiki A tries to log into wiki B, they get one of two errors:

MarkAHershberger (talkcontribs)

What do you have in your LocalSettings.php to set up shared users?

This may be a bug, but it is hard to tell if you do not provide that information.

When did this problem occur? Is this a new installation or have you recently upgraded?

Veryarcanepotatoe (talkcontribs)

the local settings for the two wiki are here:

I also have

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

These are two brand new installations of media wiki specially for this new purpose. They are empty except for the users that have been created.

All users are created in the appropriate table but not accessible the a wiki other than the one that created them.

MarkAHershberger (talkcontribs)

The default value for $wgSharedTables is [ 'user', 'user_properties' ], but you've set it to [ 'user', 'user_groups' ]. Is there a reason you removed user_properties? What happens if you add it back?

Veryarcanepotatoe (talkcontribs)

This problem happens if a user tries to log on to a wiki other than one that created the user in the first place. It happens immediately. It has happened since i first set it all up. I have never gotten it right :/

Reply to "Shared users unable to log into other wikis"