From b758725bf7fad960e971adfeb826596e02673244 Mon Sep 17 00:00:00 2001
From: Frank Karlitschek <karlitschek@kde.org>
Date: Sun, 1 Apr 2012 17:02:32 +0200
Subject: [PATCH] =?UTF-8?q?Try=20to=20configure=20php=20to=20enable=20big?=
 =?UTF-8?q?=20file=20uploads.=20This=20doesn=C2=B4t=20work=20always=20depe?=
 =?UTF-8?q?nding=20on=20the=20webserver=20and=20php=20configuration.=20Let?=
 =?UTF-8?q?=C2=B4s=20try=20to=20overwrite=20some=20defaults=20anyways?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/base.php | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/lib/base.php b/lib/base.php
index 22f7f4ea48..a4a94e8696 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -277,6 +277,24 @@ class OC{
 		date_default_timezone_set('Europe/Berlin');
 		ini_set('arg_separator.output','&amp;');
 
+		//try to configure php to enable big file uploads.
+		//this doesn´t work always depending on the webserver and php configuration.
+		//Let´s try to overwrite some defaults anyways
+		
+		//try to set the maximum execution time to 60min
+		@set_time_limit(3600);
+		@ini_set('max_execution_time',3600);
+		@ini_set('max_input_time',3600);
+
+		//try to set the maximum filesize to 10G
+		@ini_set('upload_max_filesize','10G');
+		@ini_set('post_max_size','10G');
+		@ini_set('file_uploads','50');
+
+		//try to set the session lifetime to 60min
+		@ini_set('gc_maxlifetime','3600');
+
+
 		//set http auth headers for apache+php-cgi work around
 		if (isset($_SERVER['HTTP_AUTHORIZATION']) && preg_match('/Basic\s+(.*)$/i', $_SERVER['HTTP_AUTHORIZATION'], $matches))
 		{
-- 
GitLab