Welcome to HostingForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Apache Windows ExtFilterDefine / Output / SED

 
   Web Hosting Problem Solving Community! (Home) -> Apache RSS
Next:  Good hosting providers  
Author Message
M. Agel

External


Since: Nov 10, 2007
Posts: 1



(Msg. 1) Posted: Sat Nov 10, 2007 4:00 pm
Post subject: Apache Windows ExtFilterDefine / Output / SED
Archived from groups: alt>apache>configuration (more info?)

Hi,

a couple of question concerning Apache Windows (tried 2.0 and 2.2) using the mod_ext_filter.

- Apache runs as a Reverse Proxy and I need to rewrite a received HTML document.
- On Linux I am using sed and a simple Regex to "clean up" the HTML code. Works fine.

On an Apache Windows (running on W2K3) i tried the same, trying several Win32 Builds of SED.
The call (on win) is something similiar like this:

ExtFilterDefine cleanup mode=output intype=text/html cmd="c:/sed.exe s/search/replace/g"
SetOutputFilter cleanup

What happens is that either sed (and apache) hangs or nothing at all, depeding on the version of sed. The regex is fine, it works on
the command prompt. However Apache+Sed on windows seem not to work well together.

My question:

- Anybody of you successfully modified output html code using ExtDefineFilter (or something similiar) on a Windows machine? What
tool you were using?


Tnx a lot! I am really stuck on that topic...

Mike

 >> Stay informed about: Apache Windows ExtFilterDefine / Output / SED 
Back to top
Login to vote
HansH

External


Since: Dec 08, 2006
Posts: 162



(Msg. 2) Posted: Sat Nov 10, 2007 6:00 pm
Post subject: Re: Apache Windows ExtFilterDefine / Output / SED [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"M. Agel" schreef in bericht

> a couple of question concerning Apache Windows (tried 2.0 and 2.2) using
> the mod_ext_filter.
> - Apache runs as a Reverse Proxy and I need to rewrite a received HTML
> document.
> - On Linux I am using sed and a simple Regex to "clean up" the HTML code.
> Works fine.
>
> On an Apache Windows (running on W2K3) i tried the same, trying several
> Win32 Builds of SED.
> The call (on win) is something similiar like this:
>
> ExtFilterDefine cleanup mode=output intype=text/html cmd="c:/sed.exe
> s/search/replace/g"
> SetOutputFilter cleanup
>
> What happens is that either sed (and apache) hangs or nothing at all,
> depeding on the version of sed. The regex is fine, it works on the command
> prompt. However Apache+Sed on windows seem not to work well together.
>
Taking your word against sed, try "perl -pe ' s{s}{q}g;'" or "perl -pe
'$|=1; s{s}{q}g;'"

HansH

 >> Stay informed about: Apache Windows ExtFilterDefine / Output / SED 
Back to top
Login to vote
Matt MacDougall

External


Since: Feb 11, 2009
Posts: 1



(Msg. 3) Posted: Wed Feb 11, 2009 11:54 am
Post subject: Re: Apache Windows ExtFilterDefine / Output / SED [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Both perl and sed have the same problem in my testing.

There seems to be some buggy behavior with Apache on Windows. Has
anyone had any success with this?

Using sed or perl and looking at the logs, Apache is never able to find
either sed or perl. I've tried escaping the slashes which results in
apache looking for the program at a double slashed location. When I
don't escape the slashes apache drops them

like this for example:

ExtFilterDefine fixtext mode=output intype=text/html
cmd="c:\\cygwin\\bin\\perl -pe ' s{www.domain.com}{dev.domain.com}g;'"

If I call the command that way I get this in the error log:
The system could not find the file specificed. could not create child
process to run 'c:\\cygwin\\bin\\perl'

When I call the command like c:\cygwin\bin\perl I get:
The system could not find the file specificed. could not create child
process to run 'c:cygwinbinperl'

If anyone sees a fix please let me know.

Thanks,

-Matt



On 2007-11-10 14:24:20 -0600, "HansH" said:

> "M. Agel" schreef in bericht
>
>> a couple of question concerning Apache Windows (tried 2.0 and 2.2) using
>> the mod_ext_filter.
>> - Apache runs as a Reverse Proxy and I need to rewrite a received HTML
>> document.
>> - On Linux I am using sed and a simple Regex to "clean up" the HTML code.
>> Works fine.
>>
>> On an Apache Windows (running on W2K3) i tried the same, trying several
>> Win32 Builds of SED.
>> The call (on win) is something similiar like this:
>>
>> ExtFilterDefine cleanup mode=output intype=text/html cmd="c:/sed.exe
>> s/search/replace/g"
>> SetOutputFilter cleanup
>>
>> What happens is that either sed (and apache) hangs or nothing at all,
>> depeding on the version of sed. The regex is fine, it works on the command
>> prompt. However Apache+Sed on windows seem not to work well together.
>>
> Taking your word against sed, try "perl -pe ' s{s}{q}g;'" or "perl -pe
> '$|=1; s{s}{q}g;'"
>
> HansH
 >> Stay informed about: Apache Windows ExtFilterDefine / Output / SED 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
[Q] Post-passing Apache output before it is sent - I have an Apache installation on a UNIX platform. How can I configure Apache such that it will send the output for any file according to some pattern (eg. *.html, *.cfm, *.php) through a shell-script? The idea is to strip away any superfluous whitespace....

Apache hijacked!? - Help needed Urgently !!! - output.txt .. - We have been noticing some strange errors on two of our servers recently, such as failure to mount floppy disks, failure to eject the cdrom drive. at least these are the ones that caught our attention. Nobody has physical access to the server, and nobod...

Installation Apache - Error Output handicap sanity check - I greet, I have with compilation small problem Apacha. It has accords to an aim to be compiled from PHP + OCI8. Problem appeared already at the beginning unfortunately. Here and this problem: [root@serv apache_1.3.31]# ./ configure -prefix =/ usr /..

cgi output not properly formatted - Hi, Apache2 on FreeBSD 4.8-RELEASE-p10. http://howse.no-ip.org/calendar.shtml How can I determine if the improper formatting (no cr/lf) of this cgi output is related to Apache, cgi, or MS FrontPage? I have Content-type: text/plain in my cal.cgi. I have...

regexp output filtering - Hi, I would like to filter the output content on a regexp base to avoid confidential data to be sent to the user. For instance, if the data contains "password is ...", replace it by "data not available". It can be used too to prevent ...
   Web Hosting Problem Solving Community! (Home) -> Apache All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]