[fw-general] ZF caching output. Howto disable this so can chunk serve file.

2008-10-16 Thread Julian Davchev
Hi,
I am trying to chunk serve file using fopen,fread,fseek etc.
Problem I think I am having is that ZF is caching the output...and I get
out of memory instead of using constant memory for no matter how large
file I serve for download.
Using MVC part have action for this download have disabled renderer
and layout.
Please let me know how can disable caching of page..I am pretty sure it
occurs.


Re: [fw-general] ZF caching output. Howto disable this so can chunk serve file.

2008-10-16 Thread Julian Davchev
I see that ('disableOutputBuffering',true) on frontcontroller fixed this
issue.
But not sure if can disable this per action. I guess not..as it's done
at dispatch. Controller plugin doesn't help either.



Julian Davchev wrote:
 Hi,
 I am trying to chunk serve file using fopen,fread,fseek etc.
 Problem I think I am having is that ZF is caching the output...and I get
 out of memory instead of using constant memory for no matter how large
 file I serve for download.
 Using MVC part have action for this download have disabled renderer
 and layout.
 Please let me know how can disable caching of page..I am pretty sure it
 occurs.
   



Re: [fw-general] ZF caching output. Howto disable this so can chunk serve file.

2008-10-16 Thread Karol Grecki


Julian Davchev wrote:
 
 Hi,
 I am trying to chunk serve file using fopen,fread,fseek etc.
 Problem I think I am having is that ZF is caching the output...and I get
 out of memory instead of using constant memory for no matter how large
 file I serve for download.
 Using MVC part have action for this download have disabled renderer
 and layout.
 Please let me know how can disable caching of page..I am pretty sure it
 occurs.
 
 

Just stop output buffering before sending the file.
http://www.php.net/manual/en/function.ob-end-flush.php

Karol
-- 
View this message in context: 
http://www.nabble.com/Zend-Framework-1.7-Preview-Release-is-now-available%21-tp19966314p20013271.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] ZF caching output. Howto disable this so can chunk serve file.

2008-10-16 Thread Matthew Weier O'Phinney
-- Julian Davchev [EMAIL PROTECTED] wrote
(on Thursday, 16 October 2008, 03:46 PM +0300):
 I see that ('disableOutputBuffering',true) on frontcontroller fixed this
 issue.
 But not sure if can disable this per action. I guess not..as it's done
 at dispatch. Controller plugin doesn't help either.

You *can* control it from a controller plugin, but you have to go
directly to the dispatcher to do it:

$front  = Zend_Controller_Front::getInstance();
$dispatcher = $front-getDispatcher();
$dispatcher-setParam('disableOutputBuffering', true);


 Julian Davchev wrote:
  Hi,
  I am trying to chunk serve file using fopen,fread,fseek etc.
  Problem I think I am having is that ZF is caching the output...and I get
  out of memory instead of using constant memory for no matter how large
  file I serve for download.
  Using MVC part have action for this download have disabled renderer
  and layout.
  Please let me know how can disable caching of page..I am pretty sure it
  occurs.

 

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/