go to bug id or search bugs for
I suspect this is related to https://bugs.php.net/bug.php?id=62596
apache_request_headers() and getallheaders() functions are not available when using PHP under PHP-FPM.
I am getting
PHP Fatal error: Call to undefined function apache_request_headers()
when running under PHP-FPM. Works fine under mod_php.
Same applies to getallheaders().
Also tried with PHP 5.6.10 and PHP 5.4.42 and got the same results.
In addition to this I could not get apache_request_headers() to work from CLI in PHP 5.6.10. Documentation for apache_request_headers() states
"5.5.7 This function became available in the CLI server. "
Centos 6.6 server 64bit, all PHP versions were tested by installing from IUS repositories (https://iuscommunity.org/pages/About.html)
Please let me know if you need any more info.
Add a Patch
Add a Pull Request
Actually, this is a duplicate of bug #62596.
getallheaders() is supposed to be available for the CLI server
(i.e. the built-in webserver, i.e. `php -S`), but not generally
when using the CLI sapi.