Bug #74512 [NEW]: file_get_contents fails on zlib compressed stream

From: Date: Fri, 28 Apr 2017 18:57:25 +0000
Subject: Bug #74512 [NEW]: file_get_contents fails on zlib compressed stream
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208853@lists.php.net to get a copy of this message
From: wellu at wellu dot org Operating system: Ubuntu 16.04.2 LTS PHP version: 7.0.18 Package: Filesystem function related Bug Type: Bug Bug description:file_get_contents fails on zlib compressed stream Description: ------------ Exact PHP version: PHP 7.0.15-0ubuntu0.16.04.4 (this was not selectable in dropdown?) I'm posting raw JSON data to a webserver that is gzipped. Server code is: $input_data = json_decode(trim(file_get_contents("compress.zlib://php://input")), true); which should read whatever is posted, then deflate it and then turn it in to an object. This exact code used to work in Ubuntu 14.04 which had PHP 5.x something but now I'm getting: ERROR - 2017-04-28 13:41:42 --> Severity: Warning --> file_get_contents(compress.zlib://php://input): failed to open stream: operation failed /srv/www/xxx/xxx.php 51 ERROR - 2017-04-28 13:42:19 --> Severity: Warning --> file_get_contents(): cannot represent a stream of type Input as a File Descriptor which points to the line in the beginning of this bug report. Nothing changed in the client but upgrading from 5.x to 7.x broke this. -- Edit bug report at https://bugs.php.net/bug.php?id=74512&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74512&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74512&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74512&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=74512&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=74512&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=74512&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=74512&r=needscript Try newer version: https://bugs.php.net/fix.php?id=74512&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=74512&r=support Expected behavior: https://bugs.php.net/fix.php?id=74512&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=74512&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=74512&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=74512&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74512&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=74512&r=dst IIS Stability: https://bugs.php.net/fix.php?id=74512&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=74512&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=74512&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=74512&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=74512&r=mysqlcfg

« previous php.bugs (#208853) next »