diff --git a/.htaccess b/.htaccess
index 92825ea92d..1812482675 100644
--- a/.htaccess
+++ b/.htaccess
@@ -1,5 +1,7 @@
ErrorDocument 404 //owncloud/core/templates/404.php
-php_value upload_max_filesize 512M
-php_value post_max_size 512M
-SetEnv htaccessWorking true
+
+ php_value upload_max_filesize 512M
+ php_value post_max_size 512M
+ SetEnv htaccessWorking true
+
Options -Indexes
diff --git a/lib/setup.php b/lib/setup.php
index 8386846358..9f31b47c0e 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -273,12 +273,14 @@ class OC_Setup {
* create .htaccess files for apache hosts
*/
private static function createHtaccess() {
- global $SERVERROOT;
- global $WEBROOT;
+ $SERVERROOT=OC::$SERVERROOT;
+ $WEBROOT=OC::$WEBROOT;
$content = "ErrorDocument 404 /$WEBROOT/core/templates/404.php\n";//custom 404 error page
- $content.= "php_value upload_max_filesize 20M\n";//upload limit
- $content.= "php_value post_max_size 20M\n";
- $content.= "SetEnv htaccessWorking true\n";
+ $content.= '';
+ $content.= 'php_value upload_max_filesize 512M';//upload limit
+ $content.= 'php_value post_max_size 512M';
+ $content.= 'SetEnv htaccessWorking true';
+ $content.= '';
$content.= "Options -Indexes\n";
@file_put_contents($SERVERROOT.'/.htaccess', $content); //supress errors in case we don't have permissions for it