From a24cdc06b5830669f840fa51598829ddce91f7e7 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 6 Mar 2004 03:17:43 +0000 Subject: [PATCH] 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.) --- config/index.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.20.1