On Wednesday 26 April 2006 11:06, Gioele Barabucci wrote:
> Hello,
>
> I have and unmodifiable PHP application that runs on an apache
> installation. I would like to /filter/ the output of this application
> through a
> validation layer to be writter in PHP.
> Is there a simple way to obtain this playing with the Apache configuration?

I answered an almost identical question yesterday on another list:

[cut&paste]

> Hello,
>
> I am searching for a way to parse the contents of of a coldfusion file for
> coldfusion code and after that the content should be parsed for php code
> or vice versa.

I think this would be more on-topic on the users list.

> The best way I think is to combine mod_jrun20 (for coldfusion) and the
> php4_module. How could this be done?

In terms of what they do, both coldfusion and PHP are filters: they
take an input page in their own data format, and transform it to
an output page.  Apache of course supports chaining filters, and
what you're asking makes sense and is fully supported in Apache.

What you need is versions of these modules that *run* as filters,
so the whole setup becomes simple.  But that's the province of
the developers of those modules, if they can bring them into
the 21st century.  I wouldn't hold out too much hope from PHP,
given their history of resisting advances in Apache, and deep
aversion to coexisting with other technologies in the webserver.

The alternative would be an ugly and inefficient kludge whereby
PHP runs the coldfusion in a subrequest and processess the
output of the subrequest.

[end cut&paste]

> I would like to create a chain like this:
> | request -> get.php -> validator.php -> output

I don't believe you can do that (though there are snake-oil
scripts floating around that claim to validate).  You can come
pretty close to validating by passing the output through a
DTD-based filter: for example
http://apache.webthing.com/mod_publisher/dtd.html

> With J2EE this was simple because you could stack one filter upon another
> without too much hassle. Is there something similar for Apache/PHP?

See above.  Apache, yes.

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to