From: Brion Vibber
Date: Sat, 6 Mar 2004 03:17:43 +0000 (+0000)
Subject: In case of mysterious write failure, spit out the config file for manual paste. Haven...
X-Git-Tag: 1.3.0beta1~861
X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=a24cdc06b5830669f840fa51598829ddce91f7e7;p=lhc%2Fweb%2Fwiklou.git
In case of mysterious write failure, spit out the config file for manual paste. Haven't yet determined the exact failure condition, but a user is reporting this. (The is_writable() should catch it up above.)
---
diff --git a/config/index.php b/config/index.php
index 2b6535b815..4a5acaa7b7 100644
--- a/config/index.php
+++ b/config/index.php
@@ -387,11 +387,14 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
/* Write out the config file now that all is well */
print "Creating LocalSettings.php...
\n\n";
+ $localSettings = "<" . "?php\n$local\n?" . ">";
$f = fopen( "LocalSettings.php", "xt" );
if( $f == false ) {
- dieout( "Couldn't write out LocalSettings.php. Check that the directory permissions are correct and that there isn't already a fiel of that name here." );
+ dieout( "Couldn't write out LocalSettings.php. Check that the directory permissions are correct and that there isn't already a file of that name here...
\n" .
+ "Here's the file that would have been written, try to paste it into place manually:
\n" .
+ "\n" . htmlspecialchars( $localSettings ) . "
\n" );
}
- fwrite( $f, "<" . "?php\n$local\n?" . ">" );
+ fwrite( $f, $localSettings );
fclose( $f );
print "Success! Move the LocalSettings.php file into the parent directory, then follow