|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41304 compress.zlib temp files left
Submitted: 2007-05-06 12:40 UTC Modified: 2007-05-08 12:09 UTC
From: michal dot albrecht at aster dot pl Assigned: dmitry (profile)
Status: Closed Package: Streams related
PHP Version: 5.2.2 OS: Linux
Private report: No CVE-ID: None
 [2007-05-06 12:40 UTC] michal dot albrecht at aster dot pl
Using the syntax given below leads to a temp file left in tmp directory.
The file is file.gz with random name like php??????
Previous version 5.2.1 seems to be OK.

fopen('compress.zlib://', 'rb');

Reproduce code:
$f = fopen('compress.zlib://', 'rb');
if ( !$f ) die("Error");
while ( !feof($f) ) {
echo fread($f, 1024);

Expected result:
There shouldn't be any file left in the tmp directory.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-08 08:24 UTC] judas dot iscariote at gmail dot com
yes, seems to be caused by this commit

reverting to the PHP 5.2.1 version works but leaks memory.. I guess some flag php_stream_free is missing but Im not familiar enough with the streams layer to fix it ;-(
 [2007-05-08 12:09 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Dec 03 22:01:29 2023 UTC