Template:$IP/en: Difference between revisions
[[mw:]]>FuzzyBot (Updating to match new version of source page) |
ManfredoDo (talk | contribs) m (1 revision imported: Workaround and Utility Templates) |
||
Line 1: | Line 1: | ||
<languages/> | <languages/> | ||
{{SettingSummary | |||
|name=IP | |||
|1= | |nowgprefix= | ||
|version_min=pre 1.1.0 | |||
|section=Paths | |||
|range=(String containing an absolute path.) | |||
|default=The MW_INSTALL_PATH environment variable, or if not set, the current working directory | |||
|summary=The full path to the installation directory. | |||
}} | |||
Manually setting this variable to the absolute path to MediaWiki on disk from {{ll|Manual:LocalSettings.php|LocalSettings.php}} was necessary in older versions of MediaWiki. | |||
However, at least since MediaWiki 1.18, manually defining <code>$IP</code> in LocalSettings.php is no longer needed and no longer works as you may expect. | |||
It will default to the current working directory and it can be used without the need to define it manually. | |||
If you have to override the default value you have to declare the environment variable <code>MW_INSTALL_PATH</code>. | |||
</ | See the documentation of your webserver for how to do it. | ||
{{note|1=Note that you can't just override <code>$IP</code> from your {{ll|Manual:LocalSettings.php|LocalSettings.php}} if you do not want to fix also all the variables that are based on it, like {{ll|Manual:$wgExtensionDirectory|$wgExtensionDirectory}} etc.}} | |||
== Details == | |||
IP stands for '''I'''nstall '''P'''ath. The variable holds the local file path to the base installation of your wiki. If for whatever reason you want to overwrite its default - make sure you refer to the fully qualified file path. Do not include a slash at the end of the path. | |||
In MediaWiki 1.16 and prior, where the {{ll|Manual:DefaultSettings.php|DefaultSettings.php}} file still had to be loaded from inside LocalSettings.php, the directory to load it from was determined by the IP variable. | |||
Unlike other variables, the default is set in WebStart.php instead of in DefaultSettings.php. | |||
Setting the <code>MW_INSTALL_PATH</code> environmental variable can sometimes be useful when running maintenance scripts that are in non-standard directories. (Maintenance scripts by default use the parent of the current working directory as $IP). |
Revision as of 17:53, 12 November 2022
<translate> Server URLs and file paths</translate>: $IP | |
---|---|
The full path to the installation directory. |
|
<translate> Introduced in version:</translate> | pre 1.1.0 |
<translate> Removed in version:</translate> | <translate> still in use</translate> |
<translate> Allowed values:</translate> | (String containing an absolute path.) |
<translate> Default value:</translate> | The MW_INSTALL_PATH environment variable, or if not set, the current working directory |
<translate> Other settings:</translate> <translate> Alphabetical</translate> | <translate> By function</translate> |
Manually setting this variable to the absolute path to MediaWiki on disk from LocalSettings.php was necessary in older versions of MediaWiki.
However, at least since MediaWiki 1.18, manually defining $IP
in LocalSettings.php is no longer needed and no longer works as you may expect.
It will default to the current working directory and it can be used without the need to define it manually.
If you have to override the default value you have to declare the environment variable MW_INSTALL_PATH
.
See the documentation of your webserver for how to do it.
$IP
from your LocalSettings.php if you do not want to fix also all the variables that are based on it, like $wgExtensionDirectory etc.Details
IP stands for Install Path. The variable holds the local file path to the base installation of your wiki. If for whatever reason you want to overwrite its default - make sure you refer to the fully qualified file path. Do not include a slash at the end of the path.
In MediaWiki 1.16 and prior, where the DefaultSettings.php file still had to be loaded from inside LocalSettings.php, the directory to load it from was determined by the IP variable.
Unlike other variables, the default is set in WebStart.php instead of in DefaultSettings.php.
Setting the MW_INSTALL_PATH
environmental variable can sometimes be useful when running maintenance scripts that are in non-standard directories. (Maintenance scripts by default use the parent of the current working directory as $IP).