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 17:58:57 +0400
commit4a1f1a49a0fdad2f95b09c9c3c352fe3c74c9542 (patch)
treea19cf77a42b01e5a1fd6444c83e401f8bb13934d /lib
parent6c22983f62caea05608bd4e7bcba2313b0c3a4a4 (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 8d80e9d9789..44fa47a68d8 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -5,12 +5,19 @@ $hasMySQL = is_callable('mysql_connect');
$hasPostgreSQL = is_callable('pg_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,
'hasPostgreSQL' => $hasPostgreSQL,
'directory' => $datadir,
'secureRNG' => OC_Util::secureRNG_available(),
+ 'htaccessWorking' => OC_Util::ishtaccessworking(),
'errors' => array(),
);