Skip to main content.
home | support | download

Back to List Archive

Re: [swish-e] Swish 2.4.5 working,

From: Bill Moseley <moseley(at)>
Date: Sun Feb 25 2007 - 01:46:11 GMT
On Sat, Feb 24, 2007 at 06:36:48PM +0100, Bernard T. Higonnet wrote:
> On Saturday 24 February 2007 18:00, Peter Karman wrote:
> > Bernard T. Higonnet scribbled on 2/23/07 5:36 PM:
> > > Having done this, I told myself I would now try to get it working using
> > > mod_perl, so I ran it under that. It turns out that swish/SWISH::API is
> > > working under mod_perl. The $hits = $results->Hits; is still wrong, but
> > > the actual search results are fine!

Did you run the two scripts using strace?  The fact that you get that
weird number from hits makes me thing you are linking with the wrong
libraries.  I'd take that weird number as a warning.

I'd run the script using strace and watch what files are opened -- and
do the same running apache using -X.

Did you build mod_perl yourself?  Or is it from a package?  I wonder
if the version of Perl compiled with mod_perl is different from the
Perl you use when running the script directly.

As a side note, personally I wouldn't recommend using Apache::Registry for
your mod_perl application.  It's probably fine, but in the past I've
had weird problems with registry.  Just write a real mod_perl handler.  I
think the example scripts included with swish have a mod_perl hander
entry point that you could use as an example.

My other suggestion is to not mix HTML directly in your script.  Build
data structures and pass them to a separate "view" module -- or use
one of the common templating systems (check out  Template Toolkit).
You can use Data::Dumper to dump your data for debugging.

And if you write your application in modular form you can run the
application outside of the mod_perl environment which makes it easy to

Bill Moseley

Unsubscribe from or help with the swish-e list:

Help with Swish-e:

Users mailing list
Received on Sat Feb 24 20:43:42 2007