Manual:getConfiguration.php

From Linux Web Expert

Revision as of 17:40, 23 February 2022 by imported>APaskulin (WMF) (Simplify details section by removing redundant sentence)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<td class="mw-version-versionbox" title="<translate nowrap> The latest stable version is <tvar name=1>1.41</tvar></translate>">
<translate> ≥</translate> 1.23
<translate> MediaWiki version:</translate>

Details

getConfiguration.php file is a maintenance script to print serialized output of MediaWiki config variables.

Options

Option Description Required Default
--regex Regex to filter variables with <translate> Optional</translate>
--iregex Same as --regex but case insensitive <translate> Optional</translate>
--settings Space-separated list of wg* variables <translate> Optional</translate>
--format Output format, either json, php, serialize, or vardump <translate> Optional</translate> php

Usage

php maintenance/getConfiguration.php [ --regex| --iregex| --settings| --format ]

With settings

Terminal

With regex

Terminal
Use JSON_PARTIAL_OUTPUT_ON_ERROR (--json-partial-output-on-error) flag with json_encode(). This allows for partial response to be output in case of an exception while serializing to JSON. If an error occurs, the wgGetConfigurationJsonErrorOccurred field is set in the output.
Terminal

See also