Skip to main content.
home | support | download

Back to List Archive

Re: swish.cgi problem with conf.files

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Sun Jun 05 2005 - 19:02:55 GMT
On Sun, Jun 05, 2005 at 10:24:50AM -0700, Victor Babitchev wrote:
> May be somebody can give me a tip on my problem with several swish-cgi 
> conf. files that I put to three <location directives>. The problem is that 
> access to my "locations" works "unstable", meaning that by the 1st access 
> from browser I get typically:
> 
> [Sun Jun  5 18:47:03 2005] [error] Undefined subroutine 
> &SWISH::DateRanges::DateRangeParse called at 
> /srv/www/cgi-bin/mediasrv/swish.cgi lin
> 
> by reload on browser it works (sometimes more than 1 reload is needed).

Browsers have no place in testing web applications.

That undefined subroutine error is not what I'd expect, by maybe you
didn't do a normal installation and files are not where they are
suppose to be.

I just did a configure && make install into the default location
/usr/local:

Here's a complete example:

moseley@bumby:~$ cat test.conf
Listen 3333
ServerRoot /home/moseley
ServerName localhost
ErrorLog error.log
PidFile  apache-perl.pid

LoadModule mime_module /usr/lib/apache/1.3/mod_mime.so

<perl>
    use lib '/usr/local/lib/swish-e';
    require "swish.cgi";
</perl>

<Location /search>
    PerlSetVar Swish_Conf_File /home/moseley/myconfig.pl
    SetHandler perl-script
    PerlHandler SwishSearch
</Location>


<Location /other>
    PerlSetVar Swish_Conf_File /home/moseley/otherconfig.pl
    SetHandler perl-script
    PerlHandler SwishSearch
</Location>



moseley@bumby:~$ cat myconfig.pl 
return {
    title           => 'this is the title',
    swish_index     => '/home/moseley/index.swish-e',
};

moseley@bumby:~$ cat otherconfig.pl 
return {
    title           => 'this is the other',
    swish_index     => '/home/moseley/index.swish-e',
};


moseley@bumby:~$ /usr/sbin/apache-perl -f $(pwd)/test.conf


moseley(at)not-real.bumby:~$ GET http://localhost:3333/search | grep 'this is the'
          this is the title
        <a href="http://swish-e.org"><img border="0" alt="Swish-e home page" src="http://swish-e.org/Images/swish-e.gif"></a> this is the title 



moseley(at)not-real.bumby:~$ GET http://localhost:3333/other | grep 'this is the'
          this is the other
        <a href="http://swish-e.org"><img border="0" alt="Swish-e home page" src="http://swish-e.org/Images/swish-e.gif"></a> this is the other 



-- 
Bill Moseley
moseley@hank.org

Unsubscribe from or help with the swish-e list: 
   http://swish-e.org/Discussion/

Help with Swish-e:
   http://swish-e.org/current/docs
   swish-e@sunsite.berkeley.edu
Received on Sun Jun 5 12:02:55 2005