|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70025 apache_request_headers() not available
Submitted: 2015-07-08 15:16 UTC Modified: 2015-07-10 15:49 UTC
From: andreypadiy at gmail dot com Assigned: cmb (profile)
Status: Duplicate Package: FPM related
PHP Version: 5.5.26 OS: Centos 6.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
9 + 7 = ?
Subscribe to this entry?

 [2015-07-08 15:16 UTC] andreypadiy at gmail dot com

I suspect this is related to

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 (

Please let me know if you need any more info. 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-07-10 15:49 UTC]
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2015-07-10 15:49 UTC]
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.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Oct 20 06:03:34 2021 UTC