# [Fwd: [PATCH] Backport of HEADs output API]

- Thread: https://externals.io/message/40553
- Original archive: https://news-web.php.net/php.internals/40553
- Started by Michael Wallner on 2008-09-18T19:02:47+00:00
- Messages: 16
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #40553 — Michael Wallner — 2008-09-18T19:02:47+00:00

URL: https://externals.io/message/40553#40553

In case the original with patches attached doesn't get through:

http://dev.iworks.at/PATCHES/php53-backport_output.txt
http://dev.iworks.at/PATCHES/pecl-backport_output.txt


-------- Original Message --------
Subject: [PATCH] Backport of HEADs output API
Date: Thu, 18 Sep 2008 20:51:45 +0200
From: Michael Wallner <mike@php.net>
Newsgroups: php.internals

Hi,

as some people including RM have asked me to backport HEAD's output API
(main/output.c) I prepared a patch wich does that--what else...

There's one for current PHP-5.3 source and a tiny one for PECL.

Regards,
Mike

---

## #40663 — david.zuelke@bitextender.com — 2008-09-24T13:17:04+00:00

URL: https://externals.io/message/40553#40663 · In reply to: #40553

Am 18.09.2008 um 21:02 schrieb Michael Wallner:

> In case the original with patches attached doesn't get through:
>
> http://dev.iworks.at/PATCHES/php53-backport_output.txt
> http://dev.iworks.at/PATCHES/pecl-backport_output.txt

Isn't there a typo in colorer.cpp:

+	 php_outout_get_contents(return_value);

shouldn't that be

+ php_output_get_contents(return_value);


- David

---

## #40664 — Pierre Joye — 2008-09-24T13:38:21+00:00

URL: https://externals.io/message/40553#40664 · In reply to: #40553

hi,


> In case the original with patches attached doesn't get through:
>
> http://dev.iworks.at/PATCHES/php53-backport_output.txt
> http://dev.iworks.at/PATCHES/pecl-backport_output.txt
>
>
> -------- Original Message --------
> Subject: [PATCH] Backport of HEADs output API
> Date: Thu, 18 Sep 2008 20:51:45 +0200
> From: Michael Wallner <mike@php.net>
> Newsgroups: php.internals
>
> Hi,
>
> as some people including RM have asked me to backport HEAD's output API
> (main/output.c) I prepared a patch wich does that--what else...
>
> There's one for current PHP-5.3 source and a tiny one for PECL.

What's the status on that?


Cheers,
-- 
Pierre
http://blog.thepimp.net | http://www.libgd.org

---

## #40680 — Lukas Kahwe Smith — 2008-09-25T13:54:36+00:00

URL: https://externals.io/message/40553#40680 · In reply to: #40553

> In case the original with patches attached doesn't get through:
>
> http://dev.iworks.at/PATCHES/php53-backport_output.txt
> http://dev.iworks.at/PATCHES/pecl-backport_output.txt


well the question is does it fix some real world bugs? this late in  
the game i would not want to include these changes if they "just" add  
features ..

regards,
Lukas Kahwe Smith
mls@pooteeweet.org

---

## #40681 — Pierre Joye — 2008-09-25T13:57:19+00:00

URL: https://externals.io/message/40553#40681 · In reply to: #40680

hi,


>
> 
>
> > […]
>
>
> well the question is does it fix some real world bugs? this late in the game
> i would not want to include these changes if they "just" add features ..

It does not only add features, it cleans up the mess as well. It will
also greatly ease our work if HEAD and 5.3 has the same code base.

I'm in favor of merging this code to 5.3 (for the record).

Cheers,
--
Pierre

http://blog.thepimp.net | http://www.libgd.org

---

## #40703 — Michael Wallner — 2008-09-26T10:04:21+00:00

URL: https://externals.io/message/40553#40703 · In reply to: #40680

Lukas Kahwe Smith wrote:
> well the question is does it fix some real world bugs? this late in the
> game i would not want to include these changes if they "just" add
> features ..

Huh? :)  The question to me is, why did you ask me to do it, when
you're not sure what it's about? Not to be anally at all... ;)

The greatest plus to me are:
	- getting rid of monolithic php_end_ob_buffer()
	- getting rid of output handler specific code in SAPI.c
	- being able to hook from the running output handler to change it's behavior
	- being able to clearly configure conflicts and reverse conflicts between output handlers

Regards,
Mike

---

## #40710 — Lukas Kahwe Smith — 2008-09-26T19:38:15+00:00

URL: https://externals.io/message/40553#40710 · In reply to: #40703

> Lukas Kahwe Smith wrote:
> > […]
>
> Huh? :)  The question to me is, why did you ask me to do it, when
> you're not sure what it's about? Not to be anally at all... ;)

I guess we cleared up the misunderstanding on IRC.

> The greatest plus to me are:
> 	- getting rid of monolithic php_end_ob_buffer()
> 	- getting rid of output handler specific code in SAPI.c
> 	- being able to hook from the running output handler to change it's  
> behavior
> 	- being able to clearly configure conflicts and reverse conflicts  
> between output handlers


These are all convincing arguments to have done this earlier. But  
Johannes and I are a bit worried, that this code did not see that much  
testing since it was checked in to HEAD quite a while ago. And seeing  
that the backport is mainly cleanup and not bug fixing, we are a bit  
worried about the risk this backport has (not necessarily in it  
introducing bugs, but more about BC issues here and there). Especially  
since it seems that you are the only one who actively looks after  
output buffering .. (Johannes actually asked to have this stuff in PHP  
5.3 months ago, but you were a  bit MIA back then .. and nobody else  
showed interest).

So unless you can take our worries away in terms of BC issues, I guess  
we would prefer to leave this patch out of PHP 5.3.
Sorry about the misunderstanding and the work you put into producing  
this patch.

regards,
Lukas Kahwe Smith
mls@pooteeweet.org

---

## #40712 — Pierre Joye — 2008-09-26T19:59:37+00:00

URL: https://externals.io/message/40553#40712 · In reply to: #40710

> So unless you can take our worries away in terms of BC issues, I guess we
> would prefer to leave this patch out of PHP 5.3.

I strongly disagree, for two reasons:

1. We are going to release an alpha3, that's the perfect time for such change
2. The OB code is messy right now, Mike's work cleaned it up and makes
it more maintainable. 5.3 is going to be here for a long time, let
make our work easier.

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

---

## #40713 — Jani Taskinen — 2008-09-26T20:01:50+00:00

URL: https://externals.io/message/40553#40713 · In reply to: #40710

Lukas Kahwe Smith wrote:
> 
> 
> 
> > […]
> 
> I guess we cleared up the misunderstanding on IRC.
> 
> > […]
> 
> 
> These are all convincing arguments to have done this earlier. But 
> Johannes and I are a bit worried, that this code did not see that much 
> testing since it was checked in to HEAD quite a while ago. And seeing 
> that the backport is mainly cleanup and not bug fixing, we are a bit 
> worried about the risk this backport has (not necessarily in it 
> introducing bugs, but more about BC issues here and there). Especially 
> since it seems that you are the only one who actively looks after output 
> buffering .. (Johannes actually asked to have this stuff in PHP 5.3 
> months ago, but you were a  bit MIA back then .. and nobody else showed 
> interest).
> 
> So unless you can take our worries away in terms of BC issues, I guess 
> we would prefer to leave this patch out of PHP 5.3.
> Sorry about the misunderstanding and the work you put into producing 
> this patch.

The patch fixes several output buffer bugs. Those alone are enough to 
allow this getting in PHP_5_3 and really get TESTED too.

You're releasing alphas still, so something like this is not really that 
bad..

--Jani

---

## #40714 — Daniel Brown — 2008-09-26T20:03:13+00:00

URL: https://externals.io/message/40553#40714 · In reply to: #40712

>
> I strongly disagree, for two reasons:
>
> 1. We are going to release an alpha3, that's the perfect time for such change
> 2. The OB code is messy right now, Mike's work cleaned it up and makes
> it more maintainable. 5.3 is going to be here for a long time, let
> make our work easier.

    I've just been reading the thread as it's gone along and not
contributing, but I'd like to add that I'm +1 with Pierre here.

-- 
</Daniel P. Brown>
More full-root dedicated server packages:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

---

## #40715 — Lukas Kahwe Smith — 2008-09-26T20:04:39+00:00

URL: https://externals.io/message/40553#40715 · In reply to: #40712

> On Fri, Sep 26, 2008 at 9:38 PM, Lukas Kahwe Smith  
> <mls@pooteeweet.org> wrote:
>
> > […]
>
> I strongly disagree, for two reasons:
>
> 1. We are going to release an alpha3, that's the perfect time for  
> such change

Perfect might be overstating things. Lets say it makes it possible to  
even consider it.

> 2. The OB code is messy right now, Mike's work cleaned it up and makes
> it more maintainable. 5.3 is going to be here for a long time, let
> make our work easier.


Well but messy just means its even harder to ensure BC. Like I said in  
my mail, we would have loved to have seen this earlier (when Johannes  
originally asked for this). The fact that nobody stepped up back then  
is also telling us RM's that there is a definitive risk that if there  
are issues, we might end up with a similar situation as back then.  
Without having evaluated the code in the last detail, it seems that OB  
stuff is not small or self contained by any stretch of the definition.  
Given that this patch fixes no existing bugs, we have decided that its  
too risky to do right before what we hope will be the final alpha3 in  
one of the most feature rich minor releases in PHP history. We do not  
want to risk delay this release for something that might be messy, but  
has/does work more or less reliably for people.

regards,
Lukas Kahwe Smith
mls@pooteeweet.org

---

## #40716 — Lukas Kahwe Smith — 2008-09-26T20:05:44+00:00

URL: https://externals.io/message/40553#40716 · In reply to: #40713

> Lukas Kahwe Smith wrote:
> > […]
>
> The patch fixes several output buffer bugs. Those alone are enough  
> to allow this getting in PHP_5_3 and really get TESTED too.

if it does fix bugs .. that changes things of course .. but i asked  
Mike specifically about this .. and he did not mention this .. so does  
it fix bugs or not?

regards,
Lukas Kahwe Smith
mls@pooteeweet.org

---

## #40717 — Hannes Magnusson — 2008-09-26T20:06:41+00:00

URL: https://externals.io/message/40553#40717 · In reply to: #40710

>
> and I are a bit worried, that this code did not see that much testing since
> it was checked in to HEAD quite a while ago. And seeing that the backport is

That sentence worries me a bit. Are you advocating developing new
features in 5.x branches rather then HEAD?
That code has been in HEAD for months, I so no reason not to merge it.
We are in alpha phase for a reason just like this.

-Hannes

---

## #40718 — Hannes Magnusson — 2008-09-26T20:09:36+00:00

URL: https://externals.io/message/40553#40718 · In reply to: #40716

> if it does fix bugs .. that changes things of course .. but i asked Mike
> specifically about this .. and he did not mention this .. so does it fix
> bugs or not?

It does contain at least one bug fix (see HEAD NEWS) and many obscure
bugs that have probably been bogusfied in the past.

-Hannes

---

## #40719 — Lukas Kahwe Smith — 2008-09-26T20:12:08+00:00

URL: https://externals.io/message/40553#40719 · In reply to: #40717

> On Fri, Sep 26, 2008 at 21:38, Lukas Kahwe Smith  
> <mls@pooteeweet.org> wrote:
> > […]
>
> That sentence worries me a bit. Are you advocating developing new
> features in 5.x branches rather then HEAD?

Not at all. I am not sure how you even read that into what I said.

> That code has been in HEAD for months, I so no reason not to merge it.
> We are in alpha phase for a reason just like this.


All I said was that the fact that it has been in HEAD is no proof that  
there are no BC issues or even new bugs in it. Again Johannes asked  
for this to be merged long long long ago and nobody reacted. Now we  
are at alpha2, hoping to release the last alpha soon. We have plenty  
of other big stuff that really wants to make it out of the door.

BTW: we have a similar situation for mcrypt. We have  
"cleanups" (though Derick does not define them as such) in HEAD, which  
have not been merged to 5.3. I dont like this at all, since either  
cleanups make sense or they dont. However the larger the cleanups, the  
messier the old code, the trickier it is to get BC just right and the  
less I think it makes sense to add such cleanups now.

regards,
Lukas Kahwe Smith
mls@pooteeweet.org

---

## #40722 — Steph Fox — 2008-09-27T00:34:41+00:00

URL: https://externals.io/message/40553#40722 · In reply to: #40718

> It does contain at least one bug fix (see HEAD NEWS) and many obscure
> bugs that have probably been bogusfied in the past.

I'm mouthy tonight. But I should say two things ('cos that's what I do 
best):

1) Mike's version of output buffering has been sitting in HEAD for a very 
long time
2) He wrote it because he saw problems with the existing solution

the only issue is of course:

3) has it been tested enough to justify making it mainstream PHP?

- Steph
