diff --git a/includes/installer/CoreInstaller.php b/includes/installer/CoreInstaller.php index 8809ea2bad1..0ad8eb61cb4 100644 --- a/includes/installer/CoreInstaller.php +++ b/includes/installer/CoreInstaller.php @@ -494,6 +494,9 @@ abstract class CoreInstaller extends Installer { // Allow multiple ob_flush() calls $GLOBALS['wgDisableOutputCompression'] = true; + // Use a sensible cookie prefix (not my_wiki) + $GLOBALS['wgCookiePrefix'] = 'mw_installer'; + // Some of the environment checks make shell requests, remove limits $GLOBALS['wgMaxShellMemory'] = 0; } diff --git a/includes/templates/NoLocalSettings.php b/includes/templates/NoLocalSettings.php index 88510cce494..d31b226d3c1 100644 --- a/includes/templates/NoLocalSettings.php +++ b/includes/templates/NoLocalSettings.php @@ -13,6 +13,17 @@ $script = $_SERVER['SCRIPT_NAME']; $path = pathinfo( $script, PATHINFO_DIRNAME ) . '/'; $path = str_replace( '//', '/', $path ); $ext = pathinfo( $script, PATHINFO_EXTENSION ); + +# Check to see if the installer is running +if ( !function_exists( 'session_name' ) ) { + $installerStarted = false; +} else { + session_name( 'mw_installer_session' ); + $oldReporting = error_reporting( E_ALL & ~E_NOTICE ); + $success = session_start(); + error_reporting( $oldReporting ); + $installerStarted = ( $success && isset( $_SESSION['installData'] ) ); +} ?> @@ -37,13 +48,16 @@ $ext = pathinfo( $script, PATHINFO_EXTENSION );

MediaWiki

+

LocalSettings.php not found.

+

config/LocalSettings.php to the parent directory.' ); + if ( $installerStarted ) { + echo( "Please complete the installation and download LocalSettings.php." ); } else { - echo( "Please set up the wiki first." ); + echo( "Please set up the wiki first." ); } ?> +