flush() halts script after fastcgi_finish_request()
Open
Nobody has claimed this yet.
Category: Output
Feature
SAPI: fpm
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
FPM/FastCGI Apache 2.4.54
<?php
fastcgi_finish_request();
flush(); // script halts after calling this function somewhere or here
file_put_contents(__DIR__.'/test.txt', microtime(TRUE), FILE_APPEND | LOCK_EX);
?>
PHP Version
PHP 7.4.30
Operating System
Linux 3.10.0-1062.12.1.el7.x86_64 Apache 2.4.54
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the provided script with PHP 7.4.30 under FPM/FastCGI and Apache 2.4.54 on Linux, then observe whether execution continues after fastcgi_finish_request() and flush(). Confirm the expected behavior by checking whether test.txt receives the timestamp, and investigate the runtime boundary where the script stops.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- apache, linux, php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100