php.net |  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
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.
Password:
Status:
Package:
Bug Type:
Summary:
From: michal dot albrecht at aster dot pl
New email:
PHP Version: OS:

 

 [2007-05-06 12:40 UTC] michal dot albrecht at aster dot pl
Description:
------------
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://http://www.somedomain.pl/file.gz', 'rb');

Reproduce code:
---------------
$f = fopen('compress.zlib://http://www.somedomain.pl/file.gz', 'rb');
if ( !$f ) die("Error");
while ( !feof($f) ) {
echo fread($f, 1024);
}
fclose($f);

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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/zlib_fopen_wrapper.c?r1=1.48&r2=1.49


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] dmitry@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 11:01:27 2024 UTC