cgi script doesn't import bogofilter output

Gyepi SAM gyepi at praxis-sw.com
Fri Jan 23 03:20:27 CET 2004


On Thu, Jan 22, 2004 at 04:58:52PM -0800, Chris Fortune wrote:
> 
> This is probably a *nix permissions question, but maybe not, since bogofilter is the only program that gives me this problem.  I
> have a perl script that calls bogofilter in this way:
> 
>         $res = `bogofilter -T < $filename`;

Change it to this:

         $res = `bogofilter -T < $filename 2>&1`;

So any errors show up in $res. Of course, you'll need to look at $exitcode to
determine whether $res contains valid data.

>         $exitcode = $? >> 8;
> 
> It works well from the command line, spitting out the expected Terse output (eg: "H 0.00804545"), and exitcode 0 or 1.  But, when I
> run it from the web (a cgi demo for my partner), $res is empty and exitcode is always 139.

Did you try running from the command line as the web server user?

Sounds like a permissions issue ;)

-Gyepi




More information about the Bogofilter mailing list