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

From: Date: Mon, 12 Mar 2018 15:24:01 +0000
Subject: Bug #76082 [Com]: Http response status not working in 7.2 with header call
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214303@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76082&edit=1 ID: 76082 Comment by: spam2 at rhsoft dot net Reported by: auroraeosrose@php.net Summary: Http response status not working in 7.2 with header call Status: Open Type: Bug Package: CGI/CLI related Operating System: Windows PHP Version: 7.2.3 Block user comment: N Private report: N New Comment: header('HTTP/1.1 403 Forbidden', true, 403); Previous Comments: ------------------------------------------------------------------------ [2018-03-12 15:20:15] auroraeosrose@php.net 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 this bug report at https://bugs.php.net/bug.php?id=76082&edit=1

« previous php.bugs (#214303) next »