[PHP-DEV] PHP 4.0 Bug #9754: Canceled stdout streams end up in apache's error_log From: seth <email protected>
Date: 03/14/01

From: seth <email protected>
Operating system: Linux 2.4.2
PHP version: 4.0.4pl1
PHP Bug Type: Filesystem function related
Bug description: Canceled stdout streams end up in apache's error_log

If you readfile() a large file, then cancel the stream, the entire file ends up in the error_log. For some reason, on stream cancel, it then writes the file into Apache's error_log.

Simple script:

header("Content-type: audio/mpeg");
header("Content-length: $song[size]");
 <email protected>($song[filename]);

Just start this, cancel the stream, and watch your error_log.

I tried manipulating php.ini's error log attributes, but it didn't help. I turned off all logging, and it still showed up.

It's important to note it's not only readfile() that can place its contents into error_log. I see this with other large (very large) outputs of just text. If I cancel the downloading of a very large result page from PHP, it too will end up in the error_log.

-- 
Edit Bug report at: http://bugs.php.net/?id=9754&edit=1

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>