Last modified: 2013-09-26 05:13:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 54483 - $IP used in DefaultSettings
$IP used in DefaultSettings
Status: NEW
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
Blocks: code_quality
  Show dependency treegraph
Reported: 2013-09-23 21:44 UTC by Matthew Flaschen
Modified: 2013-09-26 05:13 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Matthew Flaschen 2013-09-23 21:44:38 UTC
The $IP variable is used in DefaultSettings.php, which means if you change it in LocalSettings.php, you must also override any DefaultSettings.php variable that depends on it.

It seems we we should either:

1. Remove all references to $IP in DefaultSettings.php, and use Setup.php (e.g. how $wgStyleDirectory works).
2. Document that $IP is now an internal variable and should not be set in LocalSettings.php.
Comment 1 Brion Vibber 2013-09-25 14:25:26 UTC
$IP has already been used to load a bunch of code in WebStart.php long before LocalSettings.php is loaded -- it's WAY too late to change $IP there.

The only semi-correct way I can see to change it is to set the MW_INSTALL_PATH environment variable which can override the dirname(__FILE__) path, and I'm not 100% convinced that's actually useful for anything in the first place.

Comments in the code seem to indicate it can be used to override expansion of symlinks, but that seems like a wonky idea -- you've already hit at least index.php and includes/WebStart.php from the base directory, so you can't really flip to another version or something.

Note You need to log in before you can comment on or make changes to this bug.