summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrion Vibber <brion@users.mediawiki.org>2005-04-17 23:24:27 +0000
committerBrion Vibber <brion@users.mediawiki.org>2005-04-17 23:24:27 +0000
commitfcec450db417b2b2887baa480adcfed28f078938 (patch)
tree49e2540e49293e0ae75d805f2bb635117204d548
parentf9a18fc56ad68ab50a82abcba23e5fe774971745 (diff)
* (bug 1107) Work around includes problem in installer when parent dir is not1.4.1
readable by the web server
Notes
http://mediawiki.org/wiki/Special:Code/MediaWiki/8426
-rw-r--r--RELEASE-NOTES8
-rw-r--r--config/index.php30
2 files changed, 27 insertions, 11 deletions
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 36b6923d8d7e..9c6dba264a88 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -16,6 +16,12 @@ All new installations are highly recommended to use 1.4.1 instead of 1.3.x;
for relevant bug fixes; see the changelog later in this file.
+If you have trouble, remember to read this whole file and the online FAQ page
+before asking for help:
+
+http://meta.wikimedia.org/wiki/MediaWiki_FAQ
+
+
=== READ THIS FIRST: Upgrading ===
If upgrading from an older release, see the notes in the file UPGRADE.
@@ -494,6 +500,8 @@ pages for purposes of page relevancy ranking.
* (bug 1849) New option allows to consider categorized images as used on
Special:Unusedimages
* Localized category namespace for ka (Georgian)
+* (bug 1107) Work around includes problem in installer when parent dir is not
+ readable by the web server
=== Caveats ===
diff --git a/config/index.php b/config/index.php
index da64a4f8c65e..098a6f841bca 100644
--- a/config/index.php
+++ b/config/index.php
@@ -107,13 +107,21 @@ header( "Content-type: text/html; charset=utf-8" );
<?php
-$IP = ".."; # Just to suppress notices, not for anything useful
+# Relative includes seem to break if a parent directory is not readable;
+# this is common for public_html subdirs under user home directories.
+#
+# As a dirty hack, we'll try to set up the include path first.
+#
+$IP = dirname( dirname( __FILE__ ) );
+$sep = (DIRECTORY_SEPARATOR == "\\") ? ";" : ":";
+ini_set( "include_path", ".$sep$IP$sep$IP/includes$sep$IP/languages" );
+
define( "MEDIAWIKI", true );
define( "MEDIAWIKI_INSTALL", true );
-require_once( "../includes/Defines.php" );
-require_once( "../includes/DefaultSettings.php" );
-require_once( "../includes/MagicWord.php" );
-require_once( "../includes/Namespace.php" );
+require_once( "includes/Defines.php" );
+require_once( "includes/DefaultSettings.php" );
+require_once( "includes/MagicWord.php" );
+require_once( "includes/Namespace.php" );
?>
<h1>MediaWiki <?php print $wgVersion ?> installation</h1>
@@ -156,10 +164,10 @@ if( !is_writable( "." ) ) {
}
-require_once( "../install-utils.inc" );
-require_once( "../maintenance/updaters.inc" );
-require_once( "../maintenance/convertLinks.inc" );
-require_once( "../maintenance/archives/moveCustomMessages.inc" );
+require_once( "install-utils.inc" );
+require_once( "maintenance/updaters.inc" );
+require_once( "maintenance/convertLinks.inc" );
+require_once( "maintenance/archives/moveCustomMessages.inc" );
class ConfigData {
function getEncoded( $data ) {
@@ -427,7 +435,7 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
require_once( "includes/Setup.php" );
chdir( "config" );
- require_once( "../maintenance/InitialiseMessages.inc" );
+ require_once( "maintenance/InitialiseMessages.inc" );
$wgTitle = Title::newFromText( "Installation script" );
$wgDatabase = Database::newFromParams( $wgDBserver, "root", $conf->RootPW, "", 1 );
@@ -1063,7 +1071,7 @@ function getLanguageList() {
$wgContLanguageCode = "xxx";
function wfLocalUrl( $x ) { return $x; }
function wfLocalUrlE( $x ) { return $x; }
- require_once( "../languages/Names.php" );
+ require_once( "languages/Names.php" );
}
$codes = array();