mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
better error reporting during installation
This commit is contained in:
parent
14fd20d0ef
commit
c2a5b49834
2 changed files with 8 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class OC_Crypt {
|
|||
|
||||
// Write the file
|
||||
$username=OC_USER::getUser();
|
||||
file_put_contents(OC_Config::getValue( "datadirectory").'/'.$username.'/encryption.key', $enckey );
|
||||
@file_put_contents(OC_Config::getValue( "datadirectory").'/'.$username.'/encryption.key', $enckey );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue