From: mmj048 at gmail dot com Operating system: Windows Vista PHP version: 5.2.6 PHP Bug Type: Feature/Change Request Bug description: gzip functions don't read/write mtime header
Description: ------------ The gzencode and gzwrite functions, which implement RFC 1952 (http://www.gzip.org/zlib/rfc-gzip.html), don't read/write the mtime header. While this is not necessary for gzip compliance (http://www.gzip.org/zlib/rfc-gzip.html#id-compliance) adding a function to read/write the mtime header when compressing or reading compressed files would be very useful in many cases. I currently use custom code to read/write the gzip mtime header. Read: $gzmtime = end(unpack('V', file_get_contents($gzfile, null, null, 4, 4))); Write: $r = fopen($gzfile, 'r+'); fseek($r, 4); fwrite($r, pack('V', $filemtime), 4); fclose($r); -- Edit bug report at http://bugs.php.net/?id=46577&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46577&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46577&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46577&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46577&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46577&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46577&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46577&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46577&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46577&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46577&r=support Expected behavior: http://bugs.php.net/fix.php?id=46577&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46577&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46577&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46577&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46577&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46577&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46577&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46577&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46577&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46577&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46577&r=mysqlcfg
