aboutsummaryrefslogtreecommitdiffstats
path: root/lib/setup.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-08-22 17:16:37 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-08-22 17:18:54 +0200
commitd851bdac90231aaec19a7ee331a877b9c3a009ba (patch)
treea9bb97c45f03418d62918acc3d2c204bf82eef4d /lib/setup.php
parentd5ba4ec825c0c0c207b40546a3c545ce95e46235 (diff)
downloadnextcloud-server-d851bdac90231aaec19a7ee331a877b9c3a009ba.tar.gz
nextcloud-server-d851bdac90231aaec19a7ee331a877b9c3a009ba.zip
fix .htaccess file crashing apache+php-cgi
Diffstat (limited to 'lib/setup.php')
-rw-r--r--lib/setup.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/setup.php b/lib/setup.php
index 8386846358b..9f31b47c0e5 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.= '<IfModule mod_php5.c>';
+ $content.= 'php_value upload_max_filesize 512M';//upload limit
+ $content.= 'php_value post_max_size 512M';
+ $content.= 'SetEnv htaccessWorking true';
+ $content.= '</IfModule>';
$content.= "Options -Indexes\n";
@file_put_contents($SERVERROOT.'/.htaccess', $content); //supress errors in case we don't have permissions for it