ID: 26755 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Output Control Operating System: linux PHP Version: 4CVS-2003-12-31 (stable) New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2004-01-02 17:16:05] [EMAIL PROTECTED] Changing the description to be more appropriate. Looks like implicit_flush has nothing in common with output_buffering but does not mean that there is no problem. output_buffering from php.ini should be overriden(not used by default) in CLI mode. ------------------------------------------------------------------------ [2004-01-02 12:50:12] [EMAIL PROTECTED] I searched the bugs DB about something similar and didn't find anything, can you provide a bug number? Or at least some explanation what in common has this bug with register_globals. And if there is another report then "Duplicate" and not "Bogus"-ify the report. ------------------------------------------------------------------------ [2004-01-01 20:53:30] [EMAIL PROTECTED] In PHP 4.2.0, the 'register_globals' setting default changed to 'off'. See http://www.php.net/release_4_2_0.php for more info. We are sorry about the inconvenience, but this change was a necessary part of our efforts to make PHP scripting more secure and portable. There was one report about this already, search the bug DB first. ------------------------------------------------------------------------ [2003-12-31 08:37:27] [EMAIL PROTECTED] Description: ------------ In CLI implicit_flush is default to 1, however when using the reproducing code implicit_flush is not used but the value of output_buffering is taken into account. If output_buffering is 0 in php.ini then everything is fine but if in php.ini the value is 4096 (or probably some value that is > 0) the output is buffered no matter it's in CLI mode. Evenmore, flush()-ing also has no effect as can be seen in the actual output. This behaviour exists both in PHP_4_3 and in HEAD. Reproduce code: --------------- php -r 'echo printf("phpversion=%s\noutput_buffering=%s\nimplicit_flush=%s\n", phpversion(),ini_get("output_buffering"), ini_get("implicit_flush"));flush();$a="fubar\n"; echo $a; fubar_func();' Expected result: ---------------- As can be seen on execution 1 and 2 of the actual result PHP dies after a fatal error of calling undefined function and after that the output which is output before the call is feed to the console. Execution 3 and 4 show the behaviour which is expected to be normal but is only valid when output_buffering is 0 (implicit_flush as it can be seen is not taken into account). Actual result: -------------- Exection 1: PHP Fatal error: Call to undefined function fubar_func() in Command line code on line 1 phpversion=5.0.0RC1-dev output_buffering=4096 implicit_flush=1 fubar Execution 2: phpversion=5.0.0RC1-dev output_buffering=0 implicit_flush=1 fubar PHP Fatal error: Call to undefined function fubar_func() in Command line code on line 1 Execution 3: PHP Fatal error: Call to undefined function: fubar_func() in Command line code on line 1 phpversion=4.3.5-dev output_buffering=4096 implicit_flush=1 fubar Execution 4: phpversion=4.3.5-dev output_buffering=0 implicit_flush=1 fubar PHP Fatal error: Call to undefined function: fubar_func() in Command line code on line 1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26755&edit=1