|  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
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: andreypadiy at gmail dot com
New email:
PHP Version: OS:


 [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-2023 The PHP Group
All rights reserved.
Last updated: Mon Mar 27 15:04:44 2023 UTC