|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52674 [FPM] Status page returns inconsistent Content-Type headers
Submitted: 2010-08-23 04:23 UTC Modified: 2011-01-18 20:32 UTC
From: php-bugs at majkl578 dot cz Assigned: fat (profile)
Status: Closed Package: FPM related
PHP Version: 5.3.3 OS: Linux Debian
Private report: No CVE-ID: None
 [2010-08-23 04:23 UTC] php-bugs at majkl578 dot cz
Apache 2 ends up with an error while trying to get content of /status url. Ping url works fine.
Same problem with /status?json and /status?html.

Apache version: 2.2.16, mpm-worker
mod_fastcgi version: 2.4.6

Test script:
<IfModule mod_fastcgi.c>
	FastCGIExternalServer /php5-fpm-handler -socket "/var/run/php5-fpm.sock"
	AddHandler php5-fcgi .php

	<LocationMatch "/(ping|status)">
		SetHandler php5-fcgi-virt
		Action php5-fcgi-virt /php5-fpm-handler.fcgi virtual

	Action php5-fcgi /php5-fpm-handler.fcgi
	ScriptAlias /php5-fpm-handler.fcgi /php5-fpm-handler

Expected result:
FPM status page

Actual result:
500 Internal error

Logged in Apache's error log:
[Mon Aug 23 04:16:55 2010] [error] [client] FastCGI: comm with server "/php5-fpm-handler" aborted: error parsing headers: malformed header 'text/plain'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-23 10:28 UTC]
-Summary: [FPM] Status page does not work under Apache 2.2 +Summary: [FPM] Status page returns inconsistent Content-Type headers -Status: Open +Status: Analyzed -Assigned To: +Assigned To: fat
 [2010-08-23 10:28 UTC]
The status page does not return a valid Content-Type header:

Content-type: text/plain

it should be

Content-type: text/plain

It affects apache but also any other front web servers. Nginx is more tolerant 
and ignores unknown / malformed headers but text/html was use instead.
 [2010-08-23 10:38 UTC]
Moreover, the Content-Type used for json was not the best choice. It was 

As specified in RFC4627, it should be application/json.
 [2010-08-23 22:40 UTC]
Automatic comment from SVN on behalf of fat
Log: - Fixed bug #52674 (FPM Status page returns inconsistent Content-Type headers).
 [2010-08-23 22:41 UTC]
-Status: Analyzed +Status: Closed
 [2010-08-23 22:41 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

 [2011-01-18 20:26 UTC] 1 dot david dot michael at gmail dot com
Is there a work around with apache to avoid upgrading to 5.3.4 or 5.3.5? Or is 
upgrading the only option?
 [2011-01-18 20:32 UTC]
this is an upgrade option only
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 22 21:01:29 2024 UTC