Re: register_shutdown_function() question in regardsto bug #8395

From: Date: Wed, 27 Dec 2000 10:06:01 +0000
Subject: Re: register_shutdown_function() question in regardsto bug #8395
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-42302@lists.php.net to get a copy of this message
Zeev Suraski wrote: > > This doesn't appear to be a bug. Shutdown functions are executed, well, on > shutdown :) That does include shutdown after exit() statements. One > inconsistency is that output from this function goes through, whereas it > doesn't go through in the Apache module. The correct behavior is actually > that of the CGI version, and not that of the Apache module. > > Does anybody have an opinion about this? Should the Apache module be fixed > so that output from the shutdown functions goes through (assuming the > client is still connceted)? yes that would be nice. To send the closing </html> for example. The standalone php and php_mod should produce the same results. The on_exit() handlers should not be restricted to do what they want to... BTW, currently there are no way to check for the connection_timeout condition in shutdown(). For some reasons PHP_CONNECTION_TIMEOUT condition is commented out in zend_execute_API.c. oleg > Zeev > > At 18:46 26/12/2000, Chris Newbill wrote: > >Been chatting with Oriol. I'd like to run this buy everyone and see if my > >assumption is correct. Please see d­çO > >;•j7ù‡žøhttp://bugs.php.net?id=8395 for more > >info. > > > >My comments from a previous email. > > > > >I can reproduce this with php 4.0.2 and php 4.0.4 on Win2K. I firmly > >believe > > >that this is because of PHP being a CGI. Cause if you think about it for a > > >second it makes sense (and now that the holidays are coming to a close I > >can > > >think =) ). > > > > > >What happens when you call a CGI script?(simplified) > > > > > >(HTTP)Request->(CGI)Request->Action->Cleanup->(HTTP)Cleanup > > > > > >The last cleanup by the web server is able to display the shutdown > >information > > >because the shutdown(CGI->Cleanup) occurs BEFORE the connection with the > >client >is cut-off and HTTP->Cleanup. When PHP is part of the web server it > >has more > > >control over the HTTP->Cleanup state, whereas when it is a CGI it does not. > >Make >sense? > > > > > >There is nothing PHP can do running as CGI to prevent those print()'s from > >being >displayed on the browser, UNLESS PHP ignores them, which would not > >fly with alot >of people I'm guessing. > > > >I'm not quite sure this is really a bug, I was not able to reproduce it > >except for on Windows 2000/Apache 1.3.14. His production environment is > >Redhat ?.? with PHP running as a CGI. I have duplicated this environment > >and not been able to reproduce the problem. > > > >Chris Newbill > >Programmer/Analyst > >OneWest.net Inc., > > > > > >-- > >PHP Development Mailing List <http://www.php.net/> > >To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > >For additional commands, e-mail: php-dev-help@lists.php.net > >To contact the list administrators, e-mail: php-list-admin@lists.php.net > > -- > Zeev Suraski <zeev@zend.com> > CTO & co-founder, Zend Technologies Ltd. > http://www.zend.com/ > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.dev (#42302) next »