From 403600fdd92edfd744342aa3c39f780fe6d15c2c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 25 Feb 2011 13:13:40 +0000 Subject: [PATCH] * removing memory limit from backup download, by switching off output buffering and zlib output compression --- setup/db_backup.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setup/db_backup.php b/setup/db_backup.php index 9c6debeff1..d3c17421da 100644 --- a/setup/db_backup.php +++ b/setup/db_backup.php @@ -37,11 +37,10 @@ if ($_POST['download']) { list($file) = each($_POST['download']); $file = $db_backup->backup_dir.'/'.basename($file); // basename to now allow to change the dir - ob_end_clean(); + while (@ob_end_clean()) ; // end all active output buffering + ini_set('zlib.output_compression',0); // switch off zlib.output_compression, as this would limit downloads in size to memory_limit html::content_header(basename($file)); - $f = fopen($file,'rb'); - fpassthru($f); - fclose($f); + readfile($file); exit; } $setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);