diff options
author | Frank Karlitschek <karlitschek@kde.org> | 2012-04-01 17:02:32 +0200 |
---|---|---|
committer | Frank Karlitschek <karlitschek@kde.org> | 2012-04-01 17:02:32 +0200 |
commit | b758725bf7fad960e971adfeb826596e02673244 (patch) | |
tree | a2a149c2fe73b800ec27356f32180452da01721d /lib/base.php | |
parent | 1b8a644c31a83279e9829aac74fbbc843d49f65d (diff) | |
download | nextcloud-server-b758725bf7fad960e971adfeb826596e02673244.tar.gz nextcloud-server-b758725bf7fad960e971adfeb826596e02673244.zip |
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
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php index 22f7f4ea486..a4a94e86968 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','&'); + //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)) { |