# [PATCH- 3rd Repost] Apache Output Filter Control

- Thread: https://externals.io/message/10004
- Original archive: https://news-web.php.net/php.internals/10004
- Started by Paul Querna on 2004-05-21T19:12:06+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #10004 — Paul Querna — 2004-05-21T19:12:06+00:00

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

This is the 3rd Time I have posted this patch. The first time I recieved
0 replies[1]. The 2nd time around Andi Gutmans provided some questions,
but nothing negative about the patches[2].

These patchs add two new functions for handling output filters in the
Apache2Handler SAPI:

bool apache_add_output_filter(string filter_name) - Attempts to add the
named filter to the Filter Chain.

This function takes in a String with the name of a Filter.  First it
gets then Output Filter Handler from Apache, based on the submitted
named.  If a filter by that name is not found, it will return false.  If
a filter was found, it will add this filter to the Output Filter Chain.
This filter will then be run after the PHP Handler has completed its
work.


array apache_get_output_filters() - Returns an array of all active
Output filters for this request

This function loops through all output filters that are active on this
request.  It then returns an array of strings with the string names of
the active filters.


An example use for this is the ability to add an XSLT output filter on
the fly, depending on conditions decided upon by PHP code.
This is can to render XML generated from PHP to the HTML for the client
browser.

The attached patches are for both PHP4 CVS and PHP5 CVS. They are also
online at: http://force-elite.com/~chip/patches/php-src/apache2-filters/

Online at the URL above, there is also a simple example. The file
demo.phps generates some simple XML, then the demo.xsl is used to
transform it into HTML.

I would like to see these Patches commited.  Are there any problems with
how they are written?

Thank You,

-Paul Querna

[1] http://marc.theaimsgroup.com/?l=php-dev&m=108243950923432&w=2

[2] http://marc.theaimsgroup.com/?t=108294567400003&r=1&w=2

---

## #10043 — Andi Gutmans — 2004-05-23T08:14:56+00:00

URL: https://externals.io/message/10004#10043 · In reply to: #10004

I suggest you resubmit it once we release 5.0. As you saw there are many 
patches which are accumulating for post 5.0.
If we release in the beginning of July (a bit over a month) then we can 
branch 5.1 right away.

Andi

At 12:12 PM 5/21/2004 -0700, Paul Querna wrote:
>This is the 3rd Time I have posted this patch. The first time I recieved
>0 replies[1]. The 2nd time around Andi Gutmans provided some questions,
>but nothing negative about the patches[2].
>
>These patchs add two new functions for handling output filters in the
>Apache2Handler SAPI:
>
>bool apache_add_output_filter(string filter_name) - Attempts to add the
>named filter to the Filter Chain.
>
>This function takes in a String with the name of a Filter.  First it
>gets then Output Filter Handler from Apache, based on the submitted
>named.  If a filter by that name is not found, it will return false.  If
>a filter was found, it will add this filter to the Output Filter Chain.
>This filter will then be run after the PHP Handler has completed its
>work.
>
>
>array apache_get_output_filters() - Returns an array of all active
>Output filters for this request
>
>This function loops through all output filters that are active on this
>request.  It then returns an array of strings with the string names of
>the active filters.
>
>
>An example use for this is the ability to add an XSLT output filter on
>the fly, depending on conditions decided upon by PHP code.
>This is can to render XML generated from PHP to the HTML for the client
>browser.
>
>The attached patches are for both PHP4 CVS and PHP5 CVS. They are also
>online at: http://force-elite.com/~chip/patches/php-src/apache2-filters/
>
>Online at the URL above, there is also a simple example. The file
>demo.phps generates some simple XML, then the demo.xsl is used to
>transform it into HTML.
>
>I would like to see these Patches commited.  Are there any problems with
>how they are written?
>
>Thank You,
>
>-Paul Querna
>
>[1] http://marc.theaimsgroup.com/?l=php-dev&m=108243950923432&w=2
>
>[2] http://marc.theaimsgroup.com/?t=108294567400003&r=1&w=2
