PHP 4.0 Bug #8395: register_shutdown_function() error
| From: | osp at tinet dot org | Date: | Sun, 24 Dec 2000 04:56:14 +0000 |
| Subject: | PHP 4.0 Bug #8395: register_shutdown_function() error | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-42204@lists.php.net to get a copy of this message | ||
From: osp@tinet.org
Operating system: Linux
PHP version: 4.0.3pl1
PHP Bug Type: Feature/Change Request
Bug description: register_shutdown_function() error
<?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)
--
Edit Bug report at: http://bugs.php.net/?id=8395&edit=1