Re: Fwd: [PHP-DEV] Output Buffering problem w/ PHP-4.0.5RC2
| From: | Anil Madhavapeddy | Date: | Sun, 01 Apr 2001 11:11:48 +0000 |
| Subject: | Re: Fwd: [PHP-DEV] Output Buffering problem w/ PHP-4.0.5RC2 | ||
| References: | 1 2 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-2700@lists.php.net to get a copy of this message | ||
Recompiling right now! :) Slow machine ...
Anil
----- Original Message -----
From: "Zeev Suraski" <zeev@zend.com>
To: "Sascha Schumann" <sascha@schumann.cx>
Cc: <php-qa@lists.php.net>
Sent: Sunday, April 01, 2001 11:59 AM
Subject: Re: [PHP-QA] Fwd: [PHP-DEV] Output Buffering problem w/
PHP-4.0.5RC2
> I sent Anil a patch that's supposed to fix the problem - and I'm waiting
> for his feedback.
>
> It's attached here if anybody wants to test it.
>
> Zeev
>
> At 12:40 1/4/2001, Sascha Schumann wrote:
> > php_end_ob_buffer() is called twice. During the first run,
> > (invoked from apache_php_module_main) line 161 of output.c
> > causes output_handler to be freed:
> >
> > zval_ptr_dtor(&OG(active_ob_buffer).output_handler);
> >
> > And because of that, the contents of output_handler are
> > invalid during the second run (invoked from
> > php_request_shutdown).
> >
> > I'm not sure what the root of the problem is here though.
> > The attached patch fixes it for me.
> >
> > - Sascha Experience IRCG
> > http://schumann.cx/
> > http://schumann.cx/ircg
> >
> >--
> >PHP Quality Assurance Mailing List
> ><http://www.php.net/>
> >To unsubscribe, e-mail: php-qa-unsubscribe@lists.php.net
> >For additional commands, e-mail: php-qa-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/
>
----------------------------------------------------------------------------
----
> Index: output.c
> ===================================================================
> RCS file: /repository/php4/ext/standard/output.c,v
> retrieving revision 1.48.2.2
> diff -u -r1.48.2.2 output.c
> --- output.c 2001/03/31 22:54:07 1.48.2.2
> +++ output.c 2001/04/01 07:17:11
> @@ -214,6 +214,7 @@
> zend_stack_destroy(&OG(ob_buffers));
> }
> }
> + OG(nesting_level)--;
> }
>
> if (send_buffer) {
> @@ -226,8 +227,6 @@
>
> if (!just_flush) {
> efree(to_be_destroyed_buffer);
> -
> - OG(nesting_level)--;
> } else {
> OG(active_ob_buffer).text_length = 0;
> OG(active_ob_buffer).status |= PHP_OUTPUT_HANDLER_START;
>
>
----------------------------------------------------------------------------
----
> --
> PHP Quality Assurance Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-qa-unsubscribe@lists.php.net
> For additional commands, e-mail: php-qa-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net