Skip to main content.
home | support | download

Back to List Archive

Re: Running swish-e on windows with mod_perl and apache - fork

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Wed May 05 2004 - 14:01:33 GMT
On Wed, May 05, 2004 at 04:46:38AM -0700, Peter Morling wrote:
> I have just tested 'search.cgi' using SWISH::API on windows 2000 it works
> fine with CGI, though you must define the Template-Toolkit (*.tt file)
> inside the
> __DATA__ section.

I'm not sure I understand your comment.  I know you cannot use __DATA__
in Apache::Registry scripts, and I thought when I tested that __DATA__ 
won't work in handlers.


> I have just tested it wit mod_perl, but i get an strange error when
> restarting the apache server, the error as following:
> 
> apache2/logs
> ----
> [Wed May 05 13:37:00 2004] [notice] Parent: Received restart signal -- 
> Restarting the server.
> [Wed May 05 13:37:00 2004] [warn] Syntax error at C:/Program Files/Apache
> Group/Apache2/conf/httpd.conf:183 Global $r object is not available. Set:
>  PerlOptions +GlobalRequest
> in httpd.conf at C:/Perl/lib/CGI.pm line 308.

I'm not a mod_perl 2 user so I can't answer.  But I read in the docs
that GlobalRequest is set by default for response handlers.
Anyway, did you try setting +GlobalRequest like it suggests?

Which version of CGI.pm do you have?  I also see some notes about that
being an issue:

  http://perl.apache.org/docs/2.0/user/config/config.html#C_GlobalRequest_


> Note this works fine when changing it to not using SWISH:API (the
> 'swish.cgi')

You mean that just by setting use_library => 1 that you start getting
this error?


By the way, you might consider using the search.cgi example program
instead of swish.cgi.  swish.cgi is bloated with features to make it
work for a number of different uses via the config settings.
search.cgi, on the other hand, is suppose to be a skeleton of a script
that you can more easily customize.  And it's a lot smaller.


-- 
Bill Moseley
moseley@hank.org
Received on Wed May 5 07:01:36 2004