Hi,
to test changes to operations/mediawiki-config, I'd like to display the settings for a given wiki.
So far I figured out:
| <?php
| $IP = 'wmf-config'; | $cluster = 'pmtpa';
| require ('/home/tim/public_html/w/includes/SiteConfiguration.php'); | require ('wmf-config/wgConf.php');
| var_dump ($wgConf->getAll ([...]));
However, all my creativity regarding parameters to getAll() only returned an empty array.
What would be the parameters needed for example to get the settings for de.wikipedia.org?
TIA, Tim
On Fri, Jan 24, 2014 at 9:35 AM, Tim Landscheidt tim@tim-landscheidt.dewrote:
Hi,
to test changes to operations/mediawiki-config, I'd like to display the settings for a given wiki.
So far I figured out:
| <?php
| $IP = 'wmf-config'; | $cluster = 'pmtpa';
| require ('/home/tim/public_html/w/includes/SiteConfiguration.php'); | require ('wmf-config/wgConf.php');
| var_dump ($wgConf->getAll ([...]));
However, all my creativity regarding parameters to getAll() only returned an empty array.
What would be the parameters needed for example to get the settings for de.wikipedia.org?
Are you saying you want to display the settings for your own wiki or someone else's wiki (whose backend you can't access)? If it's your own wiki, you can use ViewFileshttps://www.mediawiki.org/wiki/Extension:ViewFilesto let people access a special page that will display a configuration file.
Nathan Larson nathanlarson3141@gmail.com wrote:
[...]
Are you saying you want to display the settings for your own wiki or someone else's wiki (whose backend you can't access)? If it's your own wiki, you can use ViewFileshttps://www.mediawiki.org/wiki/Extension:ViewFilesto let people access a special page that will display a configuration file.
No, I meant the repository where the MediaWiki configuration of the Wikimedia cluster resides (cf. http://git.wikimedia.org/summary/?r=operations/mediawiki-config.git), and I want to display the settings of one of many configured wikis.
My use case at hand is the migration of wiki.toolserver.org to WMF. The former uses a traditional LocalSettings.php, and I want to test whether a patch to operations/mediawiki-config results in an equivalent config- uration.
Tim
I wrote:
[...]
However, all my creativity regarding parameters to getAll() only returned an empty array.
What would be the parameters needed for example to get the settings for de.wikipedia.org?
Some further debugging showed that $wgConf->settings didn't get set. This code works with "php dumpSettings.php zhwikivoyage":
| <?php
| $IP = 'wmf-config'; | $cluster = 'pmtpa'; | $wmfConfigDir = $IP;
| require ('/home/tim/public_html/w/includes/SiteConfiguration.php'); | require ('multiversion/MWRealm.php'); | require ('wmf-config/wgConf.php'); | require ('/home/tim/public_html/w/includes/Defines.php'); | require ('wmf-config/InitialiseSettings.php');
| var_dump ($argv [1], $wgConf->getAll ($argv [1]));
Testing it for example on https://gerrit.wikimedia.org/r/109076/ shows changes in wgAddGroups/sysop and wgRemoveGroups/sysop as expected.
Tim
wikitech-l@lists.wikimedia.org