Now wait, you are talking about a "forward proxy" here ? You mean that the browsers of your network have this one set up as a http proxy, and it goes and gets the pages out there for them, and returns them ?

If that's the case, then of course you could have character set issues, unless you parse all the documents on the way back, and figure out
a) what kind of data this is (a jpeg image, a css stylesheet ?)
b) if it is a "text" type, what character set and encoding it's in
c) what kind of transfer encoding may have been used (compressed ?)
etc..
I don't think that "s/foo/bar/g" will really do it.

Marcos Mendez wrote:
Could it be some output encoding issue (UTF vs ASCII)? Or perhaps
compression issue?

On Wed, Oct 21, 2009 at 1:19 PM, Marcos Mendez <marcosrmen...@gmail.com> wrote:
I should probably also mention that being through mod_proxy. I've
setup a transparent proxy and I'm trying to add some content on the
fly. Just doesn't seem to work with my php script.

--- example proxy conf ---

ExtFilterDefine myfilter1 mode=output intype=text/html
cmd="/usr/bin/php -f /etc/apache2/script1.php"

<IfModule mod_proxy.c>
<Proxy *>
SetOutputFilter myfilter1
</Proxy>
</IfModule>

Regards,

Marcos


On Wed, Oct 21, 2009 at 12:06 PM, Marcos Mendez <marcosrmen...@gmail.com> wrote:
Heheheh... I doubt my script-writing abilities! Here's a simple php5
script to echo the output.

<? php

$stdin = file_get_contents('php://stdin');

print($stdin);

?>

I've tried the script with cat sometextfile | php -f test.php and it
echoes the standard input.

Regards,

Marcos

On Wed, Oct 21, 2009 at 11:15 AM, André Warnier <a...@ice-sa.com> wrote:
Marcos Mendez wrote:
Hi,

I'm having problem running anything other than the sample sed command
used with ext_filter in the documentation (eg cmd="/bin/sed
s/verdana/aria/g"). When I try to run a script (sh, bash, or php) I
always get (binary) garbage in the output. Any ideas?

My filters are defined as:

ExtFilterDefine myfilter1 mode=output intype=text/html
cmd="/usr/bin/php -f /etc/apache2/script1.php"
ExtFilterDefine myfilter2 mode=output intype=text/html cmd="/bin/sh -f
/etc/apache2/script2.sh"
ExtFilterDefine myfilter3 mode=output intype=text/html
cmd="/etc/apache2/script3.sh"

Not that we question your script-writing abilities, but it is a bit
difficult to figure out what happens without actually seeing any of these
scripts.
Can you create a simple one, try it and show it here ?

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



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




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

Reply via email to