Bug #77123 [Opn]: getallheaders - PHP7.0, 7.1 and 7.2 FPM
| From: | cmb@php.net | Date: | Fri, 09 Nov 2018 11:51:09 +0000 |
| Subject: | Bug #77123 [Opn]: getallheaders - PHP7.0, 7.1 and 7.2 FPM | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-217880@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77123&edit=1
ID: 77123
Updated by: cmb@php.net
Reported by: vaughn dot kearns at hetzner dot co dot za
Summary: getallheaders - PHP7.0, 7.1 and 7.2 FPM
Status: Open
Type: Bug
Package: PHP options/info functions
Operating System: Linux/Debian
PHP Version: 7.0.32
Block user comment: N
Private report: N
New Comment:
The other ticket[1] is marked as bug, but I rather think it
actually was a feature request. The reporter claimed:
| getallheaders() is supposed to be available outside of the
| Apache SAPI since PHP 5.4.0.
However, this claim appears to be unjustified. The doumentation
explicitly notes in the changelog[2]:
| This function became available under FastCGI.
FastCGI is not FPM, though.
[1] <https://bugs.php.net/bug.php?id=62596>
[2] <http://php.net/manual/en/function.getallheaders.php>
Previous Comments:
------------------------------------------------------------------------
[2018-11-08 10:11:26] vaughn dot kearns at hetzner dot co dot za
Description:
------------
Get all headers returns blank with PHP7.0, PHP7.1 and PHP7.2. This bug was previously reported, Bug
#62596, however only fixed in PHP7.3.
<?php
foreach (getallheaders() as $name => $value) {
echo "$name: $value\n";
}
?>
Test script:
---------------
<?php
foreach (getallheaders() as $name => $value) {
echo "$name: $value\n";
}
?>
Expected result:
----------------
My-Header: Host: restorevk.trial.co.za User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:63.0)
Gecko/20100101 Firefox/63.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-ZA,en-GB;q=0.8,en-US;q=0.5,en;q=0.3 Accept-Encoding: gzip, deflate Connection:
keep-alive Upgrade-Insecure-Requests: 1 Cache-Control: max-age=0
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77123&edit=1