httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
Subject Re: [users@httpd] mod_proxy + PHP as an output filter not working
Date Thu, 18 Aug 2005 10:27:51 GMT
R Mills wrote:
> Kind of an interesting problem:
> I am using mod_proxy to reverse proxy a site.  In addition I am trying to
> use PHP as an output filter to do session tracking on the proxy server.
> PHP by itself as an output filter works fine.  But when it is combined with
> mod_proxy, it does not appear to be called.

I've steered well clear of PHP for some time, so anything I say here
may be ill-informed nonsense.  But my understanding is that PHP doesn't
really work as a filter.

> Anyone have any idea why, and is there anything I can tweak to get it to
> work?

I don't know, but I might be able to suggest alternatives.  For example,
mod_publisher will give you auto_prepend_file and do a better job than
PHP.

> <VirtualHost *>
> ## it works here - the contents of page_prepend.inc are processed with each
> request
> ## note: not using mod_proxy, no proxying for this vhost
> ##
>     ServerName search.example.com
>     DocumentRoot /etc/apache/htdocs
> 
>     php_value include_path ".:/etc/apache/phpmods"
>     php_value auto_prepend_file "/etc/apache/page_prepend.inc"
>     SetOutputFilter PHP
>     SetInputFilter PHP
> </VirtualHost>

Indeed, that looks like evidence of it working in a filter (assuming
there are no messages to the contrary in your error log).  But could
it really be faking it?  The difference in a proxy - or with local
contents from another dynamic source - is that it's much harder to
'fake it'.

Another possibility is that PHP's abuse of Content-Type (originally
introduced by Apache but fixed since 199?) is screwing you up.
You'd have to ask the php folks about a workaround.

-- 
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message