]> source.dussan.org Git - nextcloud-server.git/commitdiff
Try to configure php to enable big file uploads.
authorFrank Karlitschek <karlitschek@kde.org>
Sun, 1 Apr 2012 15:02:32 +0000 (17:02 +0200)
committerFrank Karlitschek <karlitschek@kde.org>
Sun, 1 Apr 2012 15:02:32 +0000 (17:02 +0200)
This doesn´t work always depending on the webserver and php configuration.
Let´s try to overwrite some defaults anyways

lib/base.php

index 22f7f4ea48658505c24e3be99900b8f3eb16f88c..a4a94e869686a3a52656a39d0ea722fa56d95a66 100644 (file)
@@ -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))
                {