Edit report at https://bugs.php.net/bug.php?id=63072&edit=1
ID: 63072
User updated by: zdexter_cds at hotmail dot com
Reported by: zdexter_cds at hotmail dot com
Summary: Request: function as register_shutdown_function, but
as it was before PHP 4.1.0
Status: Open
Type: Feature/Change Request
Package: Unknown/Other Function
Operating System: Anyone
PHP Version: 5.4.6
Block user comment: N
Private report: N
New Comment:
Also, with apache compression ob functions won't work, so it's a lot of work to just
reproduce a function which had some functionality and now has basicly none, since u can just put the
functions at the end of script, the other case is not possible, you need to change the start, mid
and end of script.
Previous Comments:
------------------------------------------------------------------------
[2014-08-11 14:19:18] zdexter_cds at hotmail dot com
Bumping this feature, since I don't understand the use of register_shutdown_function being used
as part of request.
If you want a function to be part of request, just put it before exit or in the request, right?
But if you want a function after the request you need to use Output Control Functions, which makes
you code unecessary text to control header lenght, a thing most devs won't want because php
already does it automatically, turning ur code big and poor since it was not needed with rsf
original functionality.
------------------------------------------------------------------------
[2012-09-14 20:15:17] zdexter_cds at hotmail dot com
1. you can flush you output as soon as possible, then run other functions
2. you can using ajax
3. fpm has that ability: fastcgi_finish_request()
------------------------------------------------------------------------
1.Even if you flush, request still waits till header "close" and full size of data is
received, so request is still open, but it's a way to partially solve the problem.
2. It'd generate undisered requests to server, it's more like a jerry-rig to something
could be solved in just one step.
3. If fpm has it, php could have it by default in other cases too.
"but such function will be very limited, like it can not output anything."
I know, but it'd be great, consider it, please.
------------------------------------------------------------------------
[2012-09-14 10:54:21] laruence@php.net
1. you can flush you output as soon as possible, then run other functions
2. you can using ajax
3. fpm has that ability: fastcgi_finish_request()
but such function will be very limited, like it can not output anything.
------------------------------------------------------------------------
[2012-09-12 15:08:28] zdexter_cds at hotmail dot com
Edit: bug type changed.
------------------------------------------------------------------------
[2012-09-12 15:04:40] zdexter_cds at hotmail dot com
Description:
------------
I'm asking for a function as register_shutdown_function used to be, when it
executed after client disconnects.
Reason: Get faster responses to the user when some considerably 'slow' process
might be executed in background, after processes.
I know it could be done by some custom function, as well as it's possible
through Output Control Buffers Functions, but it's more code to write, more
commands to be processed by server and it'd 'conflict' with output_buffering
setting from php.ini so you'd also need to manage it.
Also, the current function could be simulated easier than the old one, but it's
the one chosen.
It can easily be done by you, as it's just copy & paste, so I hope it's
implemented.
Thanks in advance.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63072&edit=1