Kohana 3 Command line output buffering?

I am using Kohana 3 and I have a controller that extends Kohana_Controller. I call it from the command line using:

php /path/to//index.php --uri="url/path"

It works fine, but this particular script takes a lot of time, and at runtime I repeat the status messages (echo 'status message';), but not one of the messages appears until the script completes the execution.

I want to see status messages as they echo, can someone tell me how to do this?

thank

+5
source share
1 answer

, Kohana:: init() (, bootsrap) ob_start(). , . , ob_end_flush() , , . , , .

, :

  Controller_CLI extends Controller {
       public function before() {
              // empty the output buffre
              ob_end_flush();

              // call parent before() just incase there anything 
              // in the parent before that you need/want to execute
              parent::before();
       }
  }
+8

All Articles