Show a warning in the installer if .htaccess is not working

This commit is contained in:
Lukas Reschke
2012-10-15 23:25:10 +02:00
parent 9458a6c10e
commit 3eb43c1fbe
2 changed files with 13 additions and 0 deletions

View File

@@ -6,6 +6,12 @@ $hasPostgreSQL = is_callable('pg_connect');
$hasOracle = is_callable('oci_connect');
$datadir = OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data');
// Test if .htaccess is working
$content = "<Directory /data>\n";
$content.= "Deny from All\n";
$content.= "</Directory>";
file_put_contents(OC::$SERVERROOT.'/data/.htaccess', $content);
$opts = array(
'hasSQLite' => $hasSQLite,
'hasMySQL' => $hasMySQL,
@@ -13,6 +19,7 @@ $opts = array(
'hasOracle' => $hasOracle,
'directory' => $datadir,
'secureRNG' => OC_Util::secureRNG_available(),
'htaccessWorking' => OC_Util::ishtaccessworking(),
'errors' => array(),
);