diff options
author | Frank Karlitschek <karlitschek@kde.org> | 2011-08-12 19:22:29 +0200 |
---|---|---|
committer | Frank Karlitschek <karlitschek@kde.org> | 2011-08-12 19:22:29 +0200 |
commit | c2a5b4983404685f2707ed7f31deae0088de12d7 (patch) | |
tree | 9ca91e367ec5dc65ab3a40ed31e14ae1e7339a6b /lib/config.php | |
parent | 14fd20d0ef3b83391b96c1a5c065c9fa21290423 (diff) | |
download | nextcloud-server-c2a5b4983404685f2707ed7f31deae0088de12d7.tar.gz nextcloud-server-c2a5b4983404685f2707ed7f31deae0088de12d7.zip |
better error reporting during installation
Diffstat (limited to 'lib/config.php')
-rw-r--r-- | lib/config.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/config.php b/lib/config.php index 16e9ea441d5..dafb37edd33 100644 --- a/lib/config.php +++ b/lib/config.php @@ -177,8 +177,13 @@ class OC_Config{ $content .= ");\n?>\n"; // Write the file - file_put_contents( "$SERVERROOT/config/config.php", $content ); - + $result=@file_put_contents( "$SERVERROOT/config/config.php", $content ); + if(!$result) { + $tmpl = new OC_Template( '', 'error', 'guest' ); + $tmpl->assign('errors',array(1=>array('error'=>"Can't write into config directory 'config'",'hint'=>"You can usually fix this by setting the owner of 'config' to the user that the web server uses (".exec('whoami').")"))); + $tmpl->printPage(); + exit; + } return true; } } |