php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #29846 Function to close the output stream
Submitted: 2004-08-26 11:51 UTC Modified: 2013-10-28 11:00 UTC
Votes:24
Avg. Score:4.8 ± 0.5
Reproduced:21 of 21 (100.0%)
Same Version:9 (42.9%)
Same OS:15 (71.4%)
From: vrana@php.net Assigned: krakjoe (profile)
Status: Closed Package: *General Issues
PHP Version: 5.0.1 OS: Irrelevant
Private report: No CVE-ID: None
 [2004-08-26 11:51 UTC] vrana@php.net
Description:
------------
Introduce function to force PHP to close the output stream so slower non user related functions can be executed.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-27 00:06 UTC] jtate@php.net
See also bug #15209
 [2004-08-27 11:24 UTC] vrana@php.net
There is a patch for similar function by Joseph Tate at
http://marc.theaimsgroup.com/?l=php-dev&m=104092438811407&w=2
 [2007-02-16 23:54 UTC] duerra at yahoo dot com
I am definitely looking for the pre PHP 4.1 functionality of the register_shutdown_function() to be reintroduced, even if in a different form.

One possibility would be to include a standard function to the effect of close_remote_connection(); which would then allow the script to continue executing, while flushing any remaining data to the user's browser and closing the connection.  

This functionality has any number of useful purposes, where (potentially time consuming) processing may need to be continued, but where it is not relevant to any data being output to the end user.  They should not need to wait around for the processing to finish, and other workarounds and hacks to accomplishing this are inconvenient or not always very practical.  

Please, please reintroduce some functionality to allow for this type of purpose!
 [2008-01-09 03:36 UTC] misterffoeg at hotmail dot com
I have a lot of applications written that execute background operations in an iframe with a script that has ignore_user_abort(), but this is not really a nice way to do this. I'd really like to see this come into the PHP 6 final release as well :)
 [2013-10-28 11:00 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: krakjoe
 [2013-10-28 11:00 UTC] krakjoe@php.net
The only SAPI that can support this idea gracefully already does. 

http://php.net/fastcgi_finish_request

Closing request.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 15:01:30 2024 UTC