Issue Bug Closed

#19900stdout always buffered in CLI mode

Daniel Matuschek 01/24/09, 14:53 updated 09/09/13, 10:48

Description

After upgrading from 4.2.3 to 4.2.4 output of CLI scripts is always buffered. Until 4.2.3 the output was not buffered.

Example (some code removed)

#!/usr/local/bin/php -n
<?php

// *****************************************
// Standard initialization of a CLI module:
// *****************************************

// Defining circumstances for CLI mode:
define(‘TYPO3_cliMode’, TRUE);

// Defining PATH_thisScript here: Must be the ABSOLUTE path of this script in the right context:
// This will work as long as the script is called by it’s absolute path!
//define(‘PATH_thisScript’,$_ENV[‘‘]?$_ENV[’’]:$_SERVER[‘_’]);
define(‘PATH_thisScript’,”…….”);

define(‘TYPO3_MOD_PATH’, ‘../typo3conf/ext/xxx/’);
$BACK_PATH = ‘../../../typo3/’;
$MCONF[‘name’] = ‘_CLI_xxx’;
require_once(dirname(PATH_thisScript).’/’.$BACK_PATH.‘init.php’);

  1. HERE you run your application!
  2. do something …
    ?>

(issue imported from #M10248)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.