Bug #62596 [Com]: getallheaders() missing with PHP-FPM
| From: | simon at ikanobori dot jp | Date: | Tue, 29 Apr 2014 12:39:39 +0000 |
| Subject: | Bug #62596 [Com]: getallheaders() missing with PHP-FPM | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-185500@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62596&edit=1
ID: 62596
Comment by: simon at ikanobori dot jp
Reported by: phofstetter at sensational dot ch
Summary: getallheaders() missing with PHP-FPM
Status: Open
Type: Bug
Package: FPM related
Operating System: MacOS X, Linux
PHP Version: 5.4.4
Block user comment: N
Private report: N
New Comment:
Running PHP-FPM, 5.4.4 this is present.
The documentation on http://www.php.net/manual/en/function.getallheaders.php
mentions that this function became available from 5.4.0 for FastCGI and my PHP-FPM tells me its API
is FPM/FastCGI.
A solution is to either update the documentation with the workarounds mentioned in the comments or
to more clearly define that this is not available for PHP-FPM.
Or adding it to PHP-FPM.
Previous Comments:
------------------------------------------------------------------------
[2014-03-04 03:47:09] yinchuan dot blue at gmail dot com
PHP 5.4.9 with php-fpm having this issuse.
A fix would be much appreciated.
------------------------------------------------------------------------
[2013-09-16 12:54:52] nospam dot a5ef at gribouille dot eu
I'm having the same issue.
getallheaders() works fine using PHP-CGI (5.5.3), but compiling and using a 5.5.3
PHP-FPM will raise a Fatal error: Call to undefined function getallheaders()
A fix would be much appreciated.
------------------------------------------------------------------------
[2012-07-18 12:09:34] phofstetter at sensational dot ch
Description:
------------
getallheaders() is supposed to be available outside of the Apache SAPI since PHP
5.4.0.
This is true for php-cgi for example, but it is not true for php-fpm where
getallheaders() still causes
Fatal error: Call to undefined function getallheaders()
Test script:
---------------
<?php
var_dump(getallheaders());
Expected result:
----------------
I expect to see the query headers (I need getallheaders() to get the OAuth bearer
token from the Authorization header which unfortunately doesn't survive the move
into $_SERVER)
Actual result:
--------------
Fatal error: Call to undefined function getallheaders()
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62596&edit=1