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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jc at mega-bucks dot co dot jp
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 05:01:33 2025 UTC