Re: Using Lingua::Ispell in Embperl

2001-03-14 Thread Neil Gunton

Angus Lees wrote:
> 
> On Tue, Mar 13, 2001 at 09:42:48AM -0500, Neil Gunton wrote:
> > But it doesn't seem to affect the main problem of the spawn
> > failing. This is a real corker. I wonder what else is different when
> > we are running under Apache/mod_perl?  I guess it could still be a
> > stdin problem, you mentioned that the < /dev/null redirection is not
> > exactly the same. I am stumped.
> 
> try "strace -f -p " on the running apache/mod_perl process.

Thanks Gus. I think I have found the problem - it is a generic one for
mod_perl scripts spawning other processes. You need to be really careful
about it; there is a whole section on spawning in the mod_perl
performance tuning doc, and a mention in the mod_perl traps doc. I
contacted the author of Lingua::Ispell and he doesn't have any
experience using mod_perl, though he did confirm someone else having the
same kind of problem that I am having (but no resolution). Since he is
apparently unaware of mod_perl spawning issues, I doubt that
Lingua::Ispell is "mod_perl safe" as it stands.

At this point I am thinking about writing a separate daemon wrapper for
Lingua::Ispell which I will communicate with from Embperl using sockets.
This may be the best solution, given the apparent issues with spawning
processes from mod_perl. If this works then I will pass the code back to
the author of Lingua::Ispell, because I imagine that I am not the first
person to want to do trivial spell checking from mod_perl/Embperl
scripts... hopefully what I can end up with is a simple method call,
passing in a string and getting back a list of bad words (or, perhaps,
the same string with bad words marked up somehow, e.g. in HTML). And if
I make the daemon pre-forking (i.e. able to efficiently handle multiple
requests in parallel, like apache) then it could be quite useful in a
web server environment. Plus, for busy websites you could put the
spellcheck server on its own machine, load balance etc.

Thanks again

-Neil

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Using Lingua::Ispell in Embperl

2001-03-14 Thread Gerald Richter

> And if
> I make the daemon pre-forking (i.e. able to efficiently handle multiple
> requests in parallel, like apache) then it could be quite useful in a
> web server environment. Plus, for busy websites you could put the
> spellcheck server on its own machine, load balance etc.
>

You may checkout the modules Net::Deamon and PlRPC on CPAN, which may help
you to build such a daemon. (Both are used in DBIProxyServer). I have also
made a patch to Net::Daemon to do preforking, I am not sure if this patch
has already gone into the version on CPAN. If not, I could send it to you

Gerald


-
Gerald Richterecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Using Lingua::Ispell in Embperl

2001-03-14 Thread Neil Gunton

Gerald Richter wrote:
> 
> > And if
> > I make the daemon pre-forking (i.e. able to efficiently handle multiple
> > requests in parallel, like apache) then it could be quite useful in a
> > web server environment. Plus, for busy websites you could put the
> > spellcheck server on its own machine, load balance etc.
> >
> 
> You may checkout the modules Net::Deamon and PlRPC on CPAN, which may help
> you to build such a daemon. (Both are used in DBIProxyServer). I have also
> made a patch to Net::Daemon to do preforking, I am not sure if this patch
> has already gone into the version on CPAN. If not, I could send it to you

Thanks Gerald, I will take a look at these modules. I was looking at the
Perl Cookbook (O'Reilly), which seems to have working code ready-to-use.
However, if these modules already do it...

I'll keep you posted on anything interesting, and thanks again

-Neil

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Embperl log file

2001-03-14 Thread Mustafa Mahudhawala



Hello friends,
 
A small problem -
Any one know how to set the embperl Log file 
path
for embpcgi.pl script.
 
I have installed it on freeBSD 4.2 and it keeps 
filling my
/ (root) file system, as the default location is in 
/tmp
 
Any help will be highly appreciated.
Thanx.
Regards
Mustafa M


Re: Embperl log file

2001-03-14 Thread Gerald Richter

>Any one know how to set the embperl Log file path
>for embpcgi.pl script.

You can add a

SetEnv EMPPERL_LOGFILE /path/to/embperl.log

or if you don't run Apache and can't set an environment variable, add it to
the top of embpcgi.pl, just like

$ENV{EMPPERL_LOGFILE} = '/path/to/embperl.log' ;

Gerald

-
Gerald Richterecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: make test fails for HTML::Embperl 1.3.1

2001-03-14 Thread Gerald Richter

Hi,

what OS you are running on ? Maybe you can send the output of perl -V

Gerald

P.S. Please send any futher mail via the Embperl mailing list

>
> I'm getting a make test errors in the mod_perl and cgi modes.  Let me know
> if you need any further details.
>
> Thanks,
> Tom
>
> Apache 1.3.19
> mod_perl 1.25
> Perl 5.004_05
>
> Found mod_perl  Version 1.25
> Found LWP::UserAgent  Version 1.74
> Found HTML::HeadParser  Version 2.14
> Found Apache::Session  Version 1.53
> Found CGI  Version 2.753
>
>
> Testing mod_perl mode...
>
> #88 nochdir/nochdir.htm...
> Error in Line 10
> Is: >Equal: No<
> Should: >Equal: Yes<
> Input:  test/html/nochdir/nochdir.htm
> Output: test/tmp/out.htm
> Compared to:test/cmp/nochdir.htm
> Log:test/tmp/test.log
> Testparameter:
>   option = 384
>   query_info = a=1&b=2
>   cgi = 0
>
>  ERRORS detected! NOT all test have been passed successfully
>
> *** Exit 10
> Stop.
>   /usr/bin/make test -- NOT OK
>
>
> Testing in cgi mode...
>
> #100 mdatsess.htm...
>
> [-1]Attempt to free unreferenced scalar during global destruction.
>
> Input:  test/html/mdatsess.htm
> Output: test/tmp/out.htm
> Log:test/tmp/test.log
> Testparameter:
>   query_info = cnt=0
>   cookie = expectno
>   offline = 0
>
>  ERRORS detected! NOT all test have been passed successfully
>
> *** Exit 1
> Stop.
>
>


-
Gerald Richterecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]