Apache2 content generators
Apache2 content generators
am 05.11.2009 13:38:43 von Antoine
Hello ,
Is it possible to configure apache to pass a document through 2 or more
content generating modules ??
So far i have understand that only one module can be enabled in the
content generation phase
per request.
Regards
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache2 content generators
am 05.11.2009 14:20:13 von aw
antoine wrote:
> Hello ,
>
> Is it possible to configure apache to pass a document through 2 or more
> content generating modules ??
No.
>
> So far i have understand that only one module can be enabled in the
> content generation phase
> per request.
>
Maybe if you explained what you are trying to do, and gave some details
about which Apache you are using on which system, we might find a better
answer.
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache2 content generators
am 05.11.2009 16:25:45 von Antoine
André Warnier wrote:
> antoine wrote:
>> Hello ,
>>
>> Is it possible to configure apache to pass a document through 2 or more
>> content generating modules ??
> No.
>>
>> So far i have understand that only one module can be enabled in the
>> content generation phase
>> per request.
>>
> Maybe if you explained what you are trying to do, and gave some
> details about which Apache you are using on which system, we might
> find a better answer.
I want after the metadata processing and after any input filters to have
2 content generators in the row. For example for .php files to have 2
handlers. The first one(mine) adds some stuff to the html body and the
second one is the mod_php that takes the first's results and gives the
client the final page.
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server
> Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache2 content generators
am 05.11.2009 16:36:55 von Eric Covener
On Thu, Nov 5, 2009 at 10:25 AM, antoine wrote:
> The first one(mine) adds some stuff to the html body and the
> second one is the mod_php that takes the first's results and gives the
> client the final page.
>
Is running PHP as a filter deprecated? That'd be an option.
--
Eric Covener
covener@gmail.com
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache2 content generators
am 05.11.2009 18:57:03 von Antoine
Eric Covener wrote:
> On Thu, Nov 5, 2009 at 10:25 AM, antoine wrote:
>
>> The first one(mine) adds some stuff to the html body and the
>> second one is the mod_php that takes the first's results and gives the
>> client the final page.
>>
>>
>
> Is running PHP as a filter deprecated? That'd be an option.
>
>
Sorry can you explain better. Thanks
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache2 content generators
am 05.11.2009 21:33:28 von aw
antoine wrote:
> Eric Covener wrote:
>> On Thu, Nov 5, 2009 at 10:25 AM, antoine wrote:
>>
>>> The first one(mine) adds some stuff to the html body and the
>>> second one is the mod_php that takes the first's results and gives the
>>> client the final page.
>>>
>>>
>>
>> Is running PHP as a filter deprecated? That'd be an option.
>>
>>
> Sorry can you explain better. Thanks
>
Let me roll back a little bit, and then get back to Erik's question above.
Basically, there can only be one Apache "response generator" module.
There can be "input" filters before : they filter the HTTP request and
can do something to the request, but not to the result yet, because it
is not yet created.
Then there is one "response generator". That is the one which (usually)
gets the basic document from disk (or creates it from scratch), modifies
it or not, and produces the HTTP response.
Then there can be more "output" filters, which act on the response
already produced by the response generator above, and can modify it some
more.
I am unfamiliar with mod_php, but I imagine that it usually functions
itself like the "response genrator" above. Thus, it picks up a document
from disk, examines it to see if it contains any php to process, and if
yes it processes this php and modifies the original document
accordingly. Then it sends out the result as an HTTP response.
If that is how it works, then it is going to be difficult for you to
insert something else before it. Because then, your module would have
to pick up the page from disk, do something to it, and then figure out a
way to pass that modified document to mod_php to process. But mod_php
wants to pick up the original from disk also, so you have a problem.
On the other hand, if mod_php, like Erik mentions above, can also be
configured to work as an output filter (instead of as the content
generator), then this may be the solution.
Your module could then be "content generator" : pick up the original
document from disk, produce a HTTP response, and that response would
then be processed by mod_php acting as an output filter.
Got it ?
Now you have to check yourself if mod_php /can/ be configured to work as
an output filter, like Erik seems to hint that it can, or could.
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache2 content generators
am 07.11.2009 20:20:29 von Antoine
Andre thank you very much for your response.
I think that putting mod_php (if it is possible) as an output filter is
the only solution
to my project.
Regards
André Warnier wrote:
> antoine wrote:
>> Eric Covener wrote:
>>> On Thu, Nov 5, 2009 at 10:25 AM, antoine wrote:
>>>
>>>> The first one(mine) adds some stuff to the html body and the
>>>> second one is the mod_php that takes the first's results and gives the
>>>> client the final page.
>>>>
>>>>
>>>
>>> Is running PHP as a filter deprecated? That'd be an option.
>>>
>>>
>> Sorry can you explain better. Thanks
>>
>
> Let me roll back a little bit, and then get back to Erik's question
> above.
>
> Basically, there can only be one Apache "response generator" module.
>
> There can be "input" filters before : they filter the HTTP request and
> can do something to the request, but not to the result yet, because it
> is not yet created.
>
> Then there is one "response generator". That is the one which
> (usually) gets the basic document from disk (or creates it from
> scratch), modifies it or not, and produces the HTTP response.
>
> Then there can be more "output" filters, which act on the response
> already produced by the response generator above, and can modify it
> some more.
>
> I am unfamiliar with mod_php, but I imagine that it usually functions
> itself like the "response genrator" above. Thus, it picks up a
> document from disk, examines it to see if it contains any php to
> process, and if yes it processes this php and modifies the original
> document accordingly. Then it sends out the result as an HTTP response.
>
> If that is how it works, then it is going to be difficult for you to
> insert something else before it. Because then, your module would have
> to pick up the page from disk, do something to it, and then figure out
> a way to pass that modified document to mod_php to process. But
> mod_php wants to pick up the original from disk also, so you have a
> problem.
>
> On the other hand, if mod_php, like Erik mentions above, can also be
> configured to work as an output filter (instead of as the content
> generator), then this may be the solution.
> Your module could then be "content generator" : pick up the original
> document from disk, produce a HTTP response, and that response would
> then be processed by mod_php acting as an output filter.
>
> Got it ?
> Now you have to check yourself if mod_php /can/ be configured to work
> as an output filter, like Erik seems to hint that it can, or could.
>
>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server
> Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org