Gerald Richter wrote:
>
> > I am trying to integrate a spell checker into my website, and the
> > Lingua::Ispell CPAN module looks like it will do what I need. I can
> > successfully test the module offline, in a perl script, but when I use
> > the same code in an Embperl page it fails. I see from the module
> > documentation that it calls Open2::open2 in order to call the ispell
> > application. I also notice that there is a buildup of defunct aspell
> > processes when I try to use this module in Embperl.
> >
>
> The only thing that comes to my mind, is that there is a permission problem.
> Everything else should be quite the same as offline.
>
> When you run your Embperl page offline, does it work then ?
Yes it does work in offline mode. The same minimal file just fails when
running under Apache/mod_perl. I have also tried running the script
offline as user 'nobody', which is the same as how Apache runs. Is
anyone aware of any other permissions differences, apart from the user
we are running as?
> The other thing that is different when running under Apache is, that you
> don't have a stdin. Some programms fail if stdin is /dev/null
Ok, I don't know much about this, but it sounds reasonable. Since we are
apparently running another program (ispell), I guess there is some kind
of mechanism for piping stuff between the processes, and I could imagine
that using stdin somehow.
If this is the case, then is anyone aware of a workaround for doing this
under Apache/mod_perl? (apart from running as a CGI, which is not really
an option for performance reasons).
TIA
-Neil
> > I am just doing a basic test of the module at this point, nothing
> > special. The code is as follows:
> >
> > use Lingua::Ispell;
> > $Lingua::Ispell::path = "/usr/bin/ispell";
> > Lingua::Ispell::spellcheck ("hello neil") or print OUT "oops";
> >
> > And when I run this code, each time I get another zombie process:
> > (output from ps -aux)
> >
> > nobody 2296 0.0 0.0 0 0 ? Z 11:50 0:00 [aspell <defunct>]
> > nobody 2351 1.8 0.0 0 0 ? Z 12:32 0:00 [aspell <defunct>]
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]