|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9754 Canceled stdout streams end up in apache's error_log
Submitted: 2001-03-14 13:02 UTC Modified: 2001-03-15 23:41 UTC
From: seth at brivo dot com Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.4pl1 OS: Linux 2.4.2
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: seth at brivo dot com
New email:
PHP Version: OS:


 [2001-03-14 13:02 UTC] seth at brivo dot com
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]");

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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-15 21:14 UTC]
This should be fixed in CVS.
Try latest CVS snapshot from


 [2001-03-15 23:41 UTC] seth at brivo dot com
I tried the latest version from CVS (3/15/01) and it fixed the problem!

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Feb 04 00:03:40 2023 UTC