Re: [PHP-DEV] register_shutdown_function() question in regardsto bug #8395 From: Oleg Makarenko (omakarenko <email protected>)
Date: 12/27/00

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 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 <email protected>
> >For additional commands, e-mail: php-dev-help <email protected>
> >To contact the list administrators, e-mail: php-list-admin <email protected>
>
> --
> Zeev Suraski <zeev <email protected>>
> 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 <email protected>
> For additional commands, e-mail: php-dev-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>