From: umherirrender Date: Fri, 7 Mar 2014 18:11:09 +0000 (+0100) Subject: LocalSettings.php must be readable by the server X-Git-Tag: 1.31.0-rc.0~16701^2 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=c16903a4e61b431967487e0f3ba77eb830cb108b;p=lhc%2Fweb%2Fwiklou.git LocalSettings.php must be readable by the server Change check in WebStart to is_readable and output a different text on NoLocalSettings template, when the file exists. Bug: 61094 Change-Id: I4dbdb33e468bc731fa1d6eef8e0f66e1d552d0f8 --- diff --git a/includes/WebStart.php b/includes/WebStart.php index 58c953af4a..eb79134337 100644 --- a/includes/WebStart.php +++ b/includes/WebStart.php @@ -126,8 +126,8 @@ if ( defined( 'MW_CONFIG_CALLBACK' ) ) { # LocalSettings.php is the per site customization file. If it does not exist # the wiki installer needs to be launched or the generated file uploaded to - # the root wiki directory - if ( !file_exists( MW_CONFIG_FILE ) ) { + # the root wiki directory. Give a hint, if it is not readable by the server. + if ( !is_readable( MW_CONFIG_FILE ) ) { require_once "$IP/includes/templates/NoLocalSettings.php"; die(); } diff --git a/includes/templates/NoLocalSettings.php b/includes/templates/NoLocalSettings.php index 3f49ed3292..d5b8d8bbbb 100644 --- a/includes/templates/NoLocalSettings.php +++ b/includes/templates/NoLocalSettings.php @@ -75,16 +75,21 @@ if ( !function_exists( 'session_name' ) ) {

MediaWiki

-

LocalSettings.php not found.

-

- complete the installation and download LocalSettings.php."; - } else { - echo "Please set up the wiki first."; - } - ?> -

+ +

LocalSettings.php not found.

+

+ complete the installation and download LocalSettings.php."; + } else { + echo "Please set up the wiki first."; + } + ?> +

+ +

LocalSettings.php not readable.

+

Please correct file permissions and try again.

+