|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77123 getallheaders - PHP7.0, 7.1 and 7.2 FPM
Submitted: 2018-11-08 10:11 UTC Modified: 2018-11-09 11:51 UTC
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: vaughn dot kearns at hetzner dot co dot za Assigned:
Status: Open Package: PHP options/info functions
PHP Version: 7.0.32 OS: Linux/Debian
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: vaughn dot kearns at hetzner dot co dot za
New email:
PHP Version: OS:


 [2018-11-08 10:11 UTC] vaughn dot kearns at hetzner dot co dot za
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.


foreach (getallheaders() as $name => $value) {
    echo "$name: $value\n";


Test script:

foreach (getallheaders() as $name => $value) {
    echo "$name: $value\n";


Expected result:
My-Header: Host: 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 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-11-09 11:51 UTC]
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] <>
[2] <>
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Sep 20 22:01:27 2019 UTC