Extension talk:CentralAuth/Walkthrough

Errors
Basically, I followed your instructions and can merge users, but when I try to look up global user info, I got a PHP error saying that a non-existent function was being defined. The helper said that this site-info-getting function only existed in the trunk version, however I don't know what that means.Jasper Deng 23:32, 8 February 2012 (UTC)
 * Sorry you're having issues. I'm making the assumption theres a bug in the current code, but actually don't know. You might want to try starting again and using the wmf deployed extension, which is usually more stable but isn't the latest, such as http://svn.wikimedia.org/svnroot/mediawiki/branches/wmf-deployment/extensions/CentralAuth/ Since I'm not a php programmer other than <?php echo "hello world"I can't really comment on the php error itself, although both a bug and running on an older version of MW could explain it. What version are you running? Good luck, Thompson.matthew 04:22, 9 February 2012 (UTC)
 * Using the released 1.18; I don't know what "trunk" means; the PHP error only meant that I had to "use the trunk".Jasper Deng 04:28, 9 February 2012 (UTC)

Problems
I have everything installed but when I goto GlobalGroupPermissions and attempt to edit a group, they are all disabled. And something else I noticed, the "Set of wikis where this group is active:" part says 0 for each group. I just don't get it. Hope you can help. Thanks, Jempcorp (talk) 16:57, 29 June 2012 (UTC).
 * It's OK! I fixed it by modifying the extension so that it checked local rights. Then I added a wikiset and set the groups to the wikiset, then I reverted my edits of the extension and it works perfectly! :D Thanks anyway for all your help in creating that tutorial! Jempcorp (talk) 08:23, 30 June 2012 (UTC).

Suffixes
Hi Matthew, thanks a lot for this great tutorial! One question though: Does "all databases have suffix wiki" mean that my databases have to be named with the suffix "_wiki" (like "english_database_wiki", "german_database_wiki"...) and can't have names like just "english_database"? Thanks + cheers, --Till Kraemer (talk) 14:21, 16 August 2012 (UTC)
 * That's what I did. I'll be honest, I'm not 100& sure, the CentralAuth article does say "(e.g. hypothetical databases enwiki, dewiki, frwiki, etc., pertaining to wikis belonging to the same group, all have the suffix "wiki")". Sorry for the long response. Thompson.matthew (talk) 13:34, 23 September 2012 (UTC)


 * Hi Thompson.matthew, thanks for your response! My databases don't have the _wiki suffix, maybe that's the reason why CentralAuth doesn't work for me. I will try it with the _wiki suffix. Thanks and cheers, --Till Kraemer (talk) 16:52, 25 September 2012 (UTC)

How to modify setup for databases not having the same suffix?
First, Thanks a lot for this great walkthrough. I am trying to apply it for my wiki family. I already had the databases setup. They don't have the same suffix. Their names are like this: "planets_mwen", ""planets_mwar", ""planets_mwfr"..etc How to modify the setup to be applied for databases that don't share the same suffix, as per your walkthrough? (I know that there is another question about this back in 2012, but I am hoping that more information are now available as the other questions does not have definitive answers). Also, I followed the setup of "multiple wikis sharing the same resources (link here). Can I add the settings to the "ExtensionsSettings.php" that the wiki family documentation refer to? Are there changes in your code required to get it to work from the "ExtensionsSettings.php"? Finally, is it better to add the users to the database of the most used wiki, or the pool wiki. or a totally separate database installation? I appreciate your help. Thanks a lot.

SQLite database
Could you create a walkthrough explaining in SQLite database? 2804:431:D701:FA4:108:D632:8F83:398C 14:59, 1 September 2019 (UTC)

Doesn't work
I have setup centralauth between two wikis, and it doesn't login because it keeps thinking it's a local account or something. --ErtasVideos (talk) 09:04, 15 April 2020 (UTC)

Working example for wikifarm
I thought I would share my currently working LocalSettings.php for a wikifarm of language wikis that share a single LocalSettings.php.

After some trial and error, bang this is finally working.

In my database setup, instead of using the language as a prefix and the name of the wiki as a suffix, I'm using the name of the wiki as a prefix and the language as a suffix, separated by an  character. So I had to adust the  callback accordingly.

Each language wiki is set up on a language subdomain, like wikipedia. The  for each language wiki is simply the language, as detected from the subdomain, such as "en" or "es" or "it".