php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #8395 register_shutdown_function() error
Submitted: 2000-12-23 23:56 UTC Modified: 2010-11-24 13:57 UTC
From: osp at tinet dot org Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.0.3pl1 OS: Linux
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: osp at tinet dot org
New email:
PHP Version: OS:

 

 [2000-12-23 23:56 UTC] osp at tinet dot org
<?php

register_shutdown_function("shutdown");

print("Hi There! 1<br>");
flush();
sleep(1);
print("Hi There! 2<br>");
flush();
exit();

function shutdown()
{
	print("Hi There! 3<br>");
	sleep(10);
}

?>

- The last "Hi There! 3<br>" shouldn't appear on the client browser, but it does!

- Response to client browser takes > 10 seconds!

- The script response to the client browser should be sent at the normal exit point. The shutdown funcion should be quietly executed after the client browser got his complete response.

- Being able to send response before the script completely ends can be very useful for speeding up client response times for some applications.

Hope you take these comments in consideration...
(though I understand maybe there are some limitations on the apache architecture that prevent this from working- I don't know)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-24 13:57 UTC] jani@php.net
-Status: Open +Status: Bogus -Package: Feature/Change Request +Package: *General Issues
 [2010-11-24 13:57 UTC] jani@php.net
This is intentional and will not change.
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC