Bug 15209 has been open since 24 Jan, 2002. Simply put, the behavior of the register_shutdown_function in th 4.0.x series was to close the connection to the client then run the registered functions. At the release of 4.1.0, this behavior was changed, breaking BC, and offering no alternative functionality, to run the registered functions before closing the connection with the client. Since that time my company has been using a patched version of PHP to develop its product stifling our adoption of later releases of php, even version 4.2.x releases. This has in turn reduced my ability to contribute to the php code base. It should be noted that a patch to solve the problem has been in existence since day one. I propose that we take following action: that we add a second parameter to the register_shutdown_function named "exit" which allows the user to replace the functionality once available in 4.0.x (perhaps earlier), since documented at http://www.php.net/manual/en/function.register-shutdown-function.php as "The registered shutdown functions are called after the request has been completed (including sending any output buffers), so it is not possible to send output to the browser using echo() or print(), or retrieve the contents of any output buffers using ob_get_contents()." and removed from 4.1.x and 4.2.x (which means the documentation is messed up). This will allow applications that do a lot of behind the scenes processing, i.e. graphics rendering or complex data analyses, to be built using php instead of cgi or some other alternative. I'll be happy to provide a patch for this if I can be reasonably sure that it will be committed. I hope that this issue can be resolved before the release of 4.3.0.
Joseph Tate -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php