[ZendTo] Re: ob_flush Error
Phil Daws
uxbod at splatnix.net
Wed May 23 13:50:51 BST 2012
The quick fix would be to change the code as-follows from:
// Open the file:
$fptr = fopen($this->_claimDir."/".$fileList[0]['tmpname'],'rb');
too:
// Open the file:
ob_start();
$fptr = fopen($this->_claimDir."/".$fileList[0]['tmpname'],'rb');
though from reading about flush on the PHP site a good suggestion is to create a new flush function eg:
function flush (){
echo(str_repeat(' ',256));
// check that buffer is actually set before flushing
if (ob_get_length()){
@ob_flush();
@flush();
@ob_end_flush();
}
@ob_start();
}
and then just call flush() and be done with ob_flush().
--
Thanks, Phil
----- Original Message -----
> Hi,
>
> I've started to look at ZendTo for a production system, however I'm
> seeing the following errors logged
>
> PHP Notice: ob_flush(): failed to flush buffer. No buffer to flush.
> in /local/zendto/lib/NSSDropoff.php on line 629
>
> These occur when the a dropoff is being recovered by the end user, on
> a ~4GB file, this generated 562,000 lines in the apache error_log.
> Can it be fixed ?
>
> Stuart
>
> _______________________________________________
> ZendTo mailing list
> ZendTo at zend.to
> http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto
>
More information about the ZendTo
mailing list