Re: Possible bug when wrapping CGI/FastCGI generated pages

Brian Aker <[email protected]> Mon, 7 Jan 2008 17:24:12 -0800
Newsgroups gmane.comp.apache.mod-layout
Message-ID <[email protected]>
Hi!

So basically if FastCGI can't buffer the entire contents in one pass,  
mod_layout applies the headers in multiple?
Does it ever triple?

Cheers,
	-Brian

On Jan 7, 2008, at 4:03 PM, Con Tassios wrote:

> Using mod_layout5 to add headers/footers to PHP pages works OK when  
> PHP is run
> as an Apache module, however when PHP is run as a FastCGI  
> application the
> headers and footers appear to be applied to the page multiple times,  
> if the
> size of the web page exceeds the CGI output cache buffer size.
>
> I am using mod_fcgid, Apache 2.2 and the latest mod_layout from
> http://hg.tangent.org/mod_layout-5.0.
>
> CGI version of PHP is called via an Apache 'Action' directive.
>
> In httpd.conf I have the following:
>
> <Location /fcgi/>
>        SetHandler fcgid-script
>        AddOutputFilterByType INCLUDES;LAYOUT text/html
>
>        LayoutFooter "<P> FOOTER<P>"
>        LayoutHeader "<P> HEADER<P>"
>
> </Location>
>
> AddType application/x-httpd-php .php
> Action  application/x-httpd-php /fcgi/php5
>
>
> The default size of the FastCGI OutputBufferSize is 64KB.  If PHP  
> generates a
> web page greater than 64KB multiple headers/footers appear within  
> the contents
> of the page.  Increasing OutputBufferSize to a larger amount than  
> the size
> of the page prevents this problem from occurring.
>
>
> _______________________________________________
> Mod_layout mailing list
> [email protected]
> http://lists.tangent.org/mailman/listinfo/mod_layout

--
_______________________________________________________
Brian "Krow" Aker, brian at tangent.org
Seattle, Washington
http://krow.net/                     <-- Me
http://tangent.org/                <-- Software
http://exploitseattle.com/    <-- Fun
_______________________________________________________
You can't grep a dead tree.