NYCPHP Meetup

NYPHP.org

[nycphp-talk] Output Buffering with CLI

Ronald Bradford ronald.bradford at gmail.com
Fri Jun 10 14:24:35 EDT 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20110610/b9bd87be/attachment.html>


More information about the talk mailing list