download-by-streaming handles the low-memory situation.
Compare this file as a start:
/includes/modules/pages/download/header_php.php
However, that file might be perfectly fine, but the problem stems from somewhere else.
Technically if that file is operating properly, then all the template-related content that's getting into your files should *never* get there, because the template *never* triggers if this file's code is running normally.



