Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2012-10-16 01:25:10 +0400
committerLukas Reschke <lukas@statuscode.ch>2012-10-16 01:25:15 +0400
commit3eb43c1fbe61a1663abc4e885f663250e57c6be1 (patch)
tree0f3179c646588d2111a2d4cf9b50e8410137c0b3 /lib
parent9458a6c10e63829847c533a04b5c25ca646105a9 (diff)
Show a warning in the installer if .htaccess is not working
Diffstat (limited to 'lib')
-rw-r--r--lib/setup.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/setup.php b/lib/setup.php
index be4101fd7b0..8b9103b7501 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -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(),
);