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