Bug #76082 [NEW]: Http response status not working in 7.2 with header call

From: Date: Mon, 12 Mar 2018 15:20:17 +0000
Subject: Bug #76082 [NEW]: Http response status not working in 7.2 with header call
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214302@lists.php.net to get a copy of this message
From: auroraeosrose@php.net Operating system: Windows PHP version: 7.2.3 Package: CGI/CLI related Bug Type: Bug Bug description:Http response status not working in 7.2 with header call Description: ------------ 64 bit Windows Server 2016 IIS10 Fastcgi PHP 7.1.1 <?php header('HTTP/1.1 403 Forbidden'); Works perfectly - 403 status provided IIS10 Fastcgi PHP 7.2.3 <?php header('HTTP/1.1 403 Forbidden'); Status returned is 200 OK <?php http_response_code(403); status returned is 403 Forbidden If you call the header and THEN call the http_response_code it still returns the 200 OK instead of the 403 So something is broken using headers to set response codes with fastcgi only in PHP 7.2 -- Edit bug report at https://bugs.php.net/bug.php?id=76082&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76082&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76082&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76082&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76082&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76082&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76082&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76082&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76082&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76082&r=support Expected behavior: https://bugs.php.net/fix.php?id=76082&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76082&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76082&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76082&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76082&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76082&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76082&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76082&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76082&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76082&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76082&r=mysqlcfg

« previous php.bugs (#214302) next »