ID: 24797 Updated by: [EMAIL PROTECTED] Reported By: spagmoid at yahoo dot com -Status: Open +Status: Bogus Bug Type: Feature/Change Request Operating System: WinXP PHP Version: 4.3.2 New Comment:
Sara already answered your request by pointing you at the connection handling chapter in the manual. You are asking for a way to keep executing your script after the connection has been closed. Closing the connection itself from PHP is of course impossible, but if the remote client decides to close the connection then you can allow PHP to continue executing. Please stop re-opening this. Previous Comments: ------------------------------------------------------------------------ [2003-07-26 18:42:42] spagmoid at yahoo dot com I DO NOT WANT TO SEND DATA TO THE CLIENT AFTER THE CONNECTION IS CLOSED. NOWHERE DID I SAY THAT. That is what you people keep trying to tell me to do. I don't want to do that. I never wanted to do that. I will never want to do that. That is ridiculous. "The only time PHP can continue executing after the data stream has closed is when the browser closes the connection itself." I would be more inclined to believe this if you had understood any of the question. "The only signal PHP can send to the webserver is "I'm done executing." It sends this "signal" by terminating." There may be another way to send this signal, but I doubt if either of you are in a position to tell me. "explaining your question in detail and making an attempt at civility by not attacking those who take the time to respond." It was in detail. "A way to close the connection with the client, while keeping the script running?" That's it, period. It's not a complicated issue. Sending a form letter that doesn't even match the question is not "taking the time to respond". ------------------------------------------------------------------------ [2003-07-26 18:35:39] [EMAIL PROTECTED] Again, through what mechanism do you intend to send data to the client *after* the connection is closed? But to address your original question. There is no way PHP can possibly close the data stream between itself and the client since this stream is handled by the webserver. The only signal PHP can send to the webserver is "I'm done executing." It sends this "signal" by terminating. At this point your script can not continue executing because, obviously, it has stopped. The only time PHP can continue executing after the data stream has closed is when the browser closes the connection itself. Now, that said, might I suggest you attempt to ilicit a more courteous response in the future by explaining your question in detail and making an attempt at civility by not attacking those who take the time to respond. ------------------------------------------------------------------------ [2003-07-26 16:22:52] spagmoid at yahoo dot com Jesus you people are dense. You lose the attitude. Then me try to explain this in a way you can understand: 1. script runs 2. script sends data 3. script ends connection, sending all data <- feature missing 4. script does other stuff 5. script exits ------------------------------------------------------------------------ [2003-07-26 12:32:28] [EMAIL PROTECTED] The message [EMAIL PROTECTED] included with his bogusifying was a template response. For the purposes of this bug reporting system Feature Requests and Bugs are largely equivalent. So.... scale back the attitude m'kay? Second, this *IS* bogus. As a quick look at the manual will show a chapter on "Connection Handling" in which you'll find a clearly documented reference to: http://www.php.net/manual/en/function.ignore-user-abort.php which will accomplish what you describe in the first half of your report. What you describe in the second half of your report directly contradicts the first half. You want the connection closed but you want to send the last of the mod_gzip data? ------------------------------------------------------------------------ [2003-07-25 10:26:46] spagmoid at yahoo dot com Why are you telling me this is not "a bug in PHP itself"? I didn't submit a bug, I submitted a feature change/request. That's why it says "FEATURE REQUEST" in about 20 places. register_shutdown_function() does not do what I described. I want the script to stay running AFTER the connection is closed. Data can still be sent in the function called by register_shutdown_function(), therefore the connection must still be OPEN. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/24797 -- Edit this bug report at http://bugs.php.net/?id=24797&edit=1