[PHP-DEV] Script Abortion
I have a question about PHP internal. How does PHP implement the browser related script abortion, such as when user hits the stop button in the browser, PHP can abort the script being executed in the background. Thanks Wei -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Script Abortion
i think it already does. -- Maxim Maletsky [EMAIL PROTECTED] www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home // my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3 Wei Weng [EMAIL PROTECTED] wrote... : I have a question about PHP internal. How does PHP implement the browser related script abortion, such as when user hits the stop button in the browser, PHP can abort the script being executed in the background. Thanks Wei -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Script Abortion
Maxim Maletsky wrote: i think it already does. i think that was not the question, but *how*? -- Six Offene Systeme GmbH http://www.six.de/ i.A. Hartmut Holzgraefe Email: [EMAIL PROTECTED] Tel.: +49-711-99091-77 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Script Abortion
d'oh I meant to ask how. :) Here is my understanding of the reading the code: If PHP doesn't get the correct string length for the return value of ap_rwrite call, then it knows the socket is broken, then it goes to zend_bailout() to abort the script. So that means if it is a script that gets stuck in a database query, there is no way to abort it, since PHP will not proceed onto the output part of the script *after* the database query until the query is finished. That means we will be stuck in a database query unless it times out. On Wed, 2002-10-23 at 12:21, Maxim Maletsky wrote: i think it already does. -- Maxim Maletsky [EMAIL PROTECTED] www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home // my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3 Wei Weng [EMAIL PROTECTED] wrote... : I have a question about PHP internal. How does PHP implement the browser related script abortion, such as when user hits the stop button in the browser, PHP can abort the script being executed in the background. Thanks Wei -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- Wei Weng Network Software Engineer KenCast Inc. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Script Abortion
Wei Weng [EMAIL PROTECTED] wrote... : d'oh I meant to ask how. :) Here is my understanding of the reading the code: If PHP doesn't get the correct string length for the return value of ap_rwrite call, then it knows the socket is broken, then it goes to zend_bailout() to abort the script. So that means if it is a script that gets stuck in a database query, there is no way to abort it, since PHP will not proceed onto the output part of the script *after* the database query until the query is finished. That means we will be stuck in a database query unless it times out. I've never studied this part of the code, but I think you are on the right track. Indeed, PHP does not stop DB query even if you stop the request. -- Maxim Maletsky [EMAIL PROTECTED] www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home // my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3 On Wed, 2002-10-23 at 12:21, Maxim Maletsky wrote: i think it already does. -- Maxim Maletsky [EMAIL PROTECTED] www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home // my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3 Wei Weng [EMAIL PROTECTED] wrote... : I have a question about PHP internal. How does PHP implement the browser related script abortion, such as when user hits the stop button in the browser, PHP can abort the script being executed in the background. Thanks Wei -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- Wei Weng Network Software Engineer KenCast Inc. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php