RE: [PHP-DEV] register_shutdown_function() question in regards to bug #8395 From: Chris Newbill (cnewbill <email protected>)
Date: 12/26/00

> This doesn't appear to be a bug.

I agree.

> 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)?

I think it should be consist on both the CGI and the SAPI. From the
documentation of this function I was under the impression that trying to
print things to the browser with it was a big no-no.

>> Manual Says...
>>Common Pitfalls:
>>
>>Since no output is allowed to the browser in this function, you will be
unable >>to debug it using statements such as print or echo.

Chris

>
> 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>