Bug #71730 [NEW]: compression fails
From: wowkise at gmai dot com
Operating system: ubuntu
PHP version: Irrelevant
Package: Output Control
Bug Type: Bug
Bug description:compression fails
Description:
------------
if you take a look at the test script, the output_compression shouldn't
have been sent, as there is an output before it,
however, on Ubuntu 15.10, Using php5-fpm nginx, the headers get sent
anyway regardless if there is content before it or not, and that's
breaks browsers, and shows errors such as
Chrome:
This webpage is not available - ERR_CONTENT_DECODING_FAILED
Firefox:
Content Encoding Error
The page you are trying to view cannot be shown because it uses an
invalid or unsupported form of compression.
Test script:
---------------
<?php
$obj = (object) [
'foo' => 'bar'
];
var_dump( $obj );
if ( !headers_sent() )
{
ini_set( 'zlib.output_compression', 1 );
}
Expected result:
----------------
the header shouldn't have been sent.
Actual result:
--------------
the header get sent which garbled the output, which in turn breaks the
output_compression, and causes the browsers to show error.
--
Edit bug report at https://bugs.php.net/bug.php?id=71730&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71730&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71730&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71730&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71730&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71730&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71730&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71730&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71730&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71730&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71730&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71730&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71730&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71730&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71730&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71730&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71730&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71730&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71730&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71730&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71730&r=mysqlcfg
Thread (7 messages)
- wowkise at gmai dot com