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 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:
MUST BE VALID
Solve the problem:
23 - 2 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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 Mar 28 23:01:26 2024 UTC