php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21250 echo output is blocked when using system(), exec(), backticks, etc.
Submitted: 2002-12-28 11:19 UTC Modified: 2002-12-29 04:39 UTC
From: adam at ripcord dot net Assigned:
Status: Closed Package: Output Control
PHP Version: 4.3.0 OS: OpenBSD 3.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: adam at ripcord dot net
New email:
PHP Version: OS:

 

 [2002-12-28 11:19 UTC] adam at ripcord dot net
A script that I have which automates the building of Apache + PHP + ModSSL is showing strange behavior with PHP 4.3.0.

This script works fine with 4.2.x (CGI), but as soon as I upgraded to 4.3.0 (CLI), all output from echo is blocked until the commands that I run through my many calls to system() are complete. The new CLI docs say that implicit flush is on by default with the CLI, but when using system(), exec(), or backticks this doesn't seem to be the case.

My apologies if this is mere user stupidity.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-28 11:21 UTC] iliaa@php.net
Check your php.ini, you probably have output buffering enabled.
 [2002-12-28 12:00 UTC] adam at ripcord dot net
Thanks for pointing that out, though it wasn't the problem.

The CLI documentation leads one to believe that, by default, the PHP CLI binary will override implicit_flush in the php.ini. This does not seem to be the case. Making a new copy of php.ini in a different directory and setting implicit_flush=On (along with output_buffering=Off for good measure) did the trick.

Bug? Incorrect documentation? Even more user stupidity? :)
 [2002-12-29 04:39 UTC] edink@php.net
imlicit_flush and output_buffering are two unrelated things, but this fact has been known to confuse even seasoned php developers :)

In 4.3.0 you can have php-cli.ini (or php-{sapi}.ini) which can help configure different sapi's in different ways.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 16:01:28 2024 UTC