httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pritpal Dhaliwal" <p...@desiest.org>
Subject [users@httpd] apache 2.0.45 filters
Date Mon, 05 May 2003 05:49:09 GMT
I tried sending this message before but seems like it didn't go through.

let me try ti again:

I have created perl script which is a filter

it looks like:
cat /root/bin/popunder.pl
#!/usr/bin/perl
$input = <STDIN>;
$head = "<head>";
$popunder = "<head>\n<SCRIPT LANGUAGE='JavaScript' src='mypop.js'>
</script>";
$input =~ s/$head/$popunder/i;

print $input

permission on popunder.pl looks like
-rwxr-xr-x    1 root     root          228 Apr  7 18:11
/root/bin/popunder.pl

my httpd.conf looks like

ExtFilterDefine popunder mode=output intype=text/html
cmd="/root/bin/popunder.pl"

 <Location />
SetOutputFilter popunder
 </Location>

OK, so here is the deal.

I know perl script works fine. It takes the input from STDIN and prints to
STDOUT. I have tested it manually.

When is request index.html, I get nothing. That means error happend. I have
no clue where it happens. I believe popunder.pl is never being called.

At any rate, does anyone have a clue why its giving me an error.
By the way, example sed command line thing works fine, but I wanna use perl.


Thanks In Advance,
Pritpal Dhaliwal



---------------------------------------------------------------------
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