php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1824 direct file access still used in places despite I/O abstraction
Submitted: 1999-07-22 04:22 UTC Modified: 2000-07-04 11:18 UTC
From: seanw at greymatter dot co dot uk Assigned:
Status: Closed Package: Other
PHP Version: 4.0 Beta 1 OS: Any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: seanw at greymatter dot co dot uk
New email:
PHP Version: OS:

 

 [1999-07-22 04:22 UTC] seanw at greymatter dot co dot uk
A fairly cursory search of the sources for PHP4b1 reveal that there are a number of places where statements like:

fflush(stdout);

are being used in spite of the I/O abstraction layer.  The solution that I would propose would be a FLUSH() macro that defaults to a function in the Zend output.c module to flush buffered output.  A search for stdout reveals these locations.

Should error messages be handled through a similar abstraction layer rather than being written direct to stderr???

I am somewhat surprised that Zend appears to provide for output buffering, but doesn't appear to provide for flushing the buffer unless it is destroyed.

I have only had time for a cursory examination of the sources so please excuse me if this is incorrect.

It concerns me because I have an application where I need to be able to switch output streams many times during run-time, buffering would be useful but only if output can be precisely controlled.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-22 20:04 UTC] zeev at cvs dot php dot net
Zend actually doesn't have to do with any of the output buffering, even though the function
names are prefixed with zend_ (the reason for this is that output buffering was developed
while we were working on Zend, before we moved to work on PHP 4.0;  At that time, the
distinction between what's Zend and what's PHP was less than obvious, and output buffering
was tagged as a Zend component;  We'll rename it soon).

I agree with your suggestion - the output buffering layer should also provide for a flushing
callback.
 [2000-07-04 11:18 UTC] stas at cvs dot php dot net
seems to be fixed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 23:01:28 2024 UTC