Project

General

Profile

Actions

Bug #64273

closed

Downloading FAL media via FileDumpEID.php causes an out of memory error

Added by Klaus Moser almost 10 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2015-01-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

When trying to download a large file (in my case a mp4 file) via FileDumpEID.php i get an out of memory error. The file is sent by the method dumpFileContents in class TYPO3\CMS\Core\Resource\Driver\LocalDriver. According to PHP manual the method readfile will not present any memory issues when output buffering is off, so i checked ob_get_level() in TYPO3\CMS\Core\Resource\ResourceStorage->dumpFileContents and for any reason it was 3.
Maybe it would be a good idea to disable output buffering before using readfile().

@public function dumpFileContents(FileInterface $file, $asDownload = FALSE, $alternativeFilename = NULL) {

[...]
while (ob_get_level() > 0) {
ob_end_clean();
}
$this->driver->dumpFileContents($file->getIdentifier());

}@


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #64330: dumpFileContents does not work as intended when compression is enabledClosed2015-01-17

Actions
Actions

Also available in: Atom PDF