Bug #77080 [Opn]: Deflate not working
| From: | huisman at comandi dot nl | Date: | Tue, 30 Oct 2018 08:56:31 +0000 |
| Subject: | Bug #77080 [Opn]: Deflate not working | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-217748@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77080&edit=1
ID: 77080
User updated by: huisman at comandi dot nl
Reported by: huisman at comandi dot nl
Summary: Deflate not working
Status: Open
Type: Bug
Package: Zlib related
Operating System: Ubuntu 18.04.1 LTS
-PHP Version: 7.2Git-2018-10-29 (Git)
+PHP Version: PHP 7.2.11
Block user comment: N
Private report: N
New Comment:
Strange, ran on PHP 7.2.11-3+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Oct 25 2018 06:44:08) ( NTS
) in a script it's working.
The following zlib configuration is set:
zlib
ZLib Support => enabled
Stream Wrapper => compress.zlib://
Stream Filter => zlib.inflate, zlib.deflate
Compiled Version => 1.2.11
Linked Version => 1.2.11
Directive => Local Value => Master Value
zlib.output_compression => Off => Off
zlib.output_compression_level => -1 => -1
zlib.output_handler => no value => no value
Previous Comments:
------------------------------------------------------------------------
[2018-10-29 22:39:53] cmb@php.net
Works here: <https://3v4l.org/RRJ8b>.
------------------------------------------------------------------------
[2018-10-29 14:27:42] huisman at comandi dot nl
Description:
------------
stream_filter_append in combination with zlib.deflate no longer works as
expected in PHP 7.2 and produces an empty string instead of the expected compressed string. (see
test script).
Test script:
---------------
<?php
$stream = fopen('php://temp', 'w+');
fwrite($stream, 'something something');
stream_filter_append($stream, 'zlib.deflate', STREAM_FILTER_READ, ['level' =>
6]);
rewind($stream);
$contents = fread($stream, 1024);
Expected result:
----------------
A compressed string
Actual result:
--------------
An empty string
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77080&edit=1