|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76922 FastCGI terminates connection immediately after FCGI_GET_VALUES
Submitted: 2018-09-23 15:02 UTC Modified: -
From: webmaster_20180923 at cubiclesoft dot com Assigned:
Status: Closed Package: FPM related
PHP Version: 7.2.10 OS: N/A
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: webmaster_20180923 at cubiclesoft dot com
New email:
PHP Version: OS:


 [2018-09-23 15:02 UTC] webmaster_20180923 at cubiclesoft dot com
Sending a valid FCGI_GET_VALUES record results in a valid FCGI_GET_VALUES_RESULT response BUT the connection is terminated immediately afterwards.  If a FastCGI enabled application wants to know what the limits of the FastCGI server are before beginning to make requests, then this behavior requires two separate FastCGI connections - one to obtain the information and another to make the actual request.  In addition, the conditions of a general-purpose FastCGI server can change between connections.  FCGI_GET_VALUES is not considered to be an actual request as it is a management record type AND the FastCGI specification mandates that the client drives server connection/disconnection (not the other way around).  As a result, PHP's behavior is not compliant with the FastCGI spec.

Test script:
Analysis:  The fcgi_read_request() function returns 0 back to the caller (fcgi_accept_request()) when handling FCGI_GET_VALUES.  That, in turn, results in calling fcgi_close(), which terminates the connection.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2023-11-03 14:08 UTC]
Automatic comment on behalf of bukka
Log: Fix bug #76922: FastCGI terminates conn after FCGI_GET_VALUES
 [2023-11-03 14:08 UTC]
-Status: Open +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 09:01:36 2024 UTC