php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #21508 Need a register_shutdown_function() that can send output after a timeout
Submitted: 2003-01-07 23:53 UTC Modified: 2010-12-29 17:47 UTC
From: jc at mega-bucks dot co dot jp Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.3.0 OS: Red Hat Linux 7.2
Private report: No CVE-ID: None
 [2003-01-07 23:53 UTC] jc at mega-bucks dot co dot jp
I would like to be able to detect when my scripts timeout and send an appropriate message to the browser. However it seems that even though there is a way to detect a script execution timeout in PHP there is no way to send something to the browser once a script has timed out.

The function register_shutdown_function() seems to be exactly what I need. In conjunction with connection_status() I can find when a timeout has occured and act on it.

However register_shutdown_function() will not allow one to send output to the browser since it is called *after* all output has been sent.

Could someone implement a version of register_shutdown_function() that would allow for output to be sent to the browser?

PS

I have already asked around and been told it cannot be done *but* If there is already a way to do what I trying to achieve, please let me know and sorry but the bogus request.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-29 17:47 UTC] jani@php.net
-Status: Open +Status: Bogus -Package: Feature/Change Request +Package: *General Issues
 [2010-12-29 17:47 UTC] jani@php.net
There is no way.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 19:01:30 2024 UTC