PHP4 Bug #1824: direct file access still used in places despite I/O abstraction
| From: | seanw at greymatter dot co dot uk | Date: | Thu, 22 Jul 1999 08:22:38 +0000 |
| Subject: | PHP4 Bug #1824: direct file access still used in places despite I/O abstraction | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-8948@lists.php.net to get a copy of this message | ||
From: seanw@greymatter.co.uk
Operating system: Any
PHP version: 4.0 Beta 1
PHP Bug Type: Other
Bug description: direct file access still used in places despite I/O abstraction
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.