From 036dac452f5f995fffc04bc569acb1da76cc54c4 Mon Sep 17 00:00:00 2001 From: botanic Date: Mon, 11 Nov 2013 10:54:09 -0800 Subject: [PATCH] changed it to error on bad permissions copying config.php --- .../ryzom_ams/www/html/installer/libsetup.php | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php index 56a9c5b24..dff061667 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php @@ -19,10 +19,19 @@ exit; } else { + ini_set( "display_errors", true ); + error_reporting( E_ALL ); + if (file_exists('../config.php')) { require( '../config.php' ); } else { - require( '../config.default.php' ); + //copy config.default.php to config.php! + if (!file_exists('../config.php')) { + if (!copy('../config.default.php', '../config.php')) { + echo "failed to copy ../config.php ...\n"; + exit; + } + } } //var used to access the DB; @@ -1383,14 +1392,7 @@ }catch (PDOException $e){ print "There was an error while creating the admin account! "; } - - - //copy config.default.php to config.php! - if (!file_exists('../config.php')) { - if (!copy('../config.default.php', '../config.php')) { - echo "failed to copy ../config.php ...\n"; - } - } + echo '
Reload! '; exit;