#41304 [Com]: compress.zlib temp files left
| From: | judas dot iscariote at gmail dot com | Date: | Tue, 08 May 2007 08:24:27 +0000 |
| Subject: | #41304 [Com]: compress.zlib temp files left | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-112385@lists.php.net to get a copy of this message | ||
ID: 41304
Comment by: judas dot iscariote at gmail dot com
Reported By: michal dot albrecht at aster dot pl
Status: Open
Bug Type: Streams related
Operating System: Linux
PHP Version: 5.2.2
New Comment:
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 ;-(
Previous Comments:
------------------------------------------------------------------------
[2007-05-06 12:40:39] 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.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41304&edit=1