[Tickets #5913] Re: Lower memory usage while downloading files
bugs at bugs.horde.org
bugs at bugs.horde.org
Fri Nov 30 00:01:22 UTC 2007
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=5913
-----------------------------------------------------------------------
Ticket | 5913
Updated By | olger.diekstra at cardno.com.au
Summary | Lower memory usage while downloading files
Queue | Gollem
Version | HEAD
Type | Enhancement
State | Feedback
Priority | 2. Medium
Owners | Chuck Hagenbuch
-----------------------------------------------------------------------
olger.diekstra at cardno.com.au (2007-11-29 16:01) wrote:
OK, fixed it myself. Figured out how to use objects (again, used to program
in Turbo Pascal with objects loooong time ago...), and resolved my issue
with the hardcoded pathname.
Also fixed my memory issue while I was at it. PHP memory_limit now set to
16MB, and downloading 368MB file. Sweet.
Still in the same file (gollem/view.php). This is what I done:
/* $data = $GLOBALS['gollem_vfs']->read($filedir, $filename);
if (is_a($data, 'PEAR_Error')) {
$notification->push(sprintf(_("Access denied to %s"), $filename),
'horde.error');
header('Location: ' .
Util::addParameter(Horde::applicationUrl('manager.php', true), 'actionID',
$actionID));
exit;
}*/
Commented this part out completely as it read the file into memory,
stuffing it up.
/* Run through action handlers. */
switch ($actionID) {
case 'download_file':
$File_Dir = $GLOBALS['gollem_vfs']->_getNativePath($filedir,
$filename);
$File_Size = FileSize($File_Dir);
$browser->downloadHeaders($filename, null, false, $File_Size);
ReadFileChunked($File_Dir);
/* echo $data; */
break;
Let me know what you think!
Cheers! Olger.
More information about the bugs
mailing list