php.net |  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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: andreypadiy at gmail dot com
New email:
PHP Version: OS:

 

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

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. 



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-07-10 15:49 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2015-07-10 15:49 UTC] cmb@php.net
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-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 12 14:01:28 2024 UTC