[nycphp-talk] Output Buffering with CLI
Ronald Bradford
ronald.bradford at gmail.com
Fri Jun 10 14:48:30 EDT 2011
Thanks.
Using that order actually fails.
PHP Notice: ob_flush(): failed to flush buffer. No buffer to flush.
however the following did give me what I wanted.
ob_flush();
ob_end_flush();
flush();
ob_start();
On Fri, Jun 10, 2011 at 2:34 PM, federico ulfo <rainelemental at gmail.com>wrote:
> On php.net somebody advised to flush the buffer with
>
> ob_end_flush();
> ob_flush();
> flush();
> ob_start();
>
> You can try
>
> On Jun 10, 2011, at 8:24 PM, Ronald Bradford <ronald.bradford at gmail.com>
> wrote:
>
> I am having an issue where I am not getting any output during a long
> running CLI PHP script.
>
> Before any output I do
>
> ob_start();
> ob_implicit_flush(true);
>
> After each print I do
>
> ob_flush();
>
>
> and at the end I do
>
> ob_end_flush();
>
>
>
> However running my script I never get output as it happens.
>
> e.g.
>
> $ php example.php > file.log
>
> I can confirm output is happening with
>
> $ php example.php | tee -a file.log
>
> I can see output being generated, however it is not flushed to the output
> file
>
> Any help appreciated.
>
> Regards
>
> Ronald
>
> _______________________________________________
> New York PHP Users Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/Show-Participation
>
>
> _______________________________________________
> New York PHP Users Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/Show-Participation
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20110610/433330bb/attachment.html>
More information about the talk
mailing list