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