Skip to main content.
home | support | download

Back to List Archive

Re: How to use 'user-config' in search.cgi using SWISH::API

From: Peter Morling <pmorling(at)>
Date: Wed May 05 2004 - 14:48:50 GMT
> > Also got the SWISH::API and mod_perl working and it is FAST however when
> > restarting Apache still get this error:
> >
> > ---
> > [Wed May 05 14:52:46 2004] [warn] Syntax error at C:/Program
> > Group/Apache2/conf/httpd.conf:183 Global $r object is not available.
> >  PerlOptions +GlobalRequest
> > in httpd.conf at C:/Perl/lib/ line 308.
> You may need to ask on the mod_perl list for this, after you check the
> documentation.

I found the problem:

in search.cgi you have two entry points (about line 50):

--------------------- Code ----------------------------------------
# Entry point for normal CGI programs.

# Entry point for mod_perl (not tested yet)
sub handler {
    my $r = shift;

When I commented out: #process_request(); for the CGI entry the problem
disappeared. Im sorry, if I ask simple questions, but im no perl-hacker.
Sorry again.

However, now it works greath (using mod_perl & search.cgi on windows 2000)
and is wery fast to response to query's. But the following problems:

- to configure max_chars  # Limits the size of the description_prop

- to change the things defined in
SWISH-E\share\doc\swish-e\example\ to work with 'search.cgi'

    [% FOR page = search.page_array %]
        [% IF page.cur_page %]
            <font size="-1" face="Arial, Helvetica, San-Serif">
            <b>[% page.page_number %]</b>&nbsp;
        [% ELSE %]
            <font size="-1" face="Arial, Helvetica, San-Serif">
            <a style="text-decoration:none" href="[% search.query_href
%];start=[% page.page_start %]"><u>[% page.page_number %]</u></a>&nbsp;
        [% END %]
    [% END %]

it seems that i can not refer to the 'search.page_array' but maby I can find
out from looking in 'swish.cgi'??

Received on Wed May 5 07:48:50 2004