Skip to main content.
home | support | download

Back to List Archive

Re: runs from command line, not from browser

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Mon Dec 02 2002 - 18:01:34 GMT
At 11:50 AM 12/02/02 -0600, Jody Cleveland wrote:

[my guess is you wanted this to go to swish-e list (not the squirrel mail
list)]

>> Use ReplaceRules to remove the /var/www part.
>
>Ok, got that part working great. Now, the last part I need to do is to
>make it look like the rest of my site. In swish.cgi I have this line:
>my $DEFAULT_CONFIG_FILE =
>'/usr/local/apache2/cgi-bin/wals/search/conf/swishcgi.conf';
>
>Here is my swishcgi.conf:

BTW -- you don't have to have everything in the config file.  The values in
the swishcgi.conf file will be merged with the default settings.  i.e you
don't need things like

        description_prop    => 'swishdescription',
        title_property  => 'swishdocpath',

if they are the default values.



>          template => {
>            package         => 'TemplateToolkit',
>            file            => 'search.tt',
>            options         => {
>                INCLUDE_PATH    =>
>'/usr/local/apache2/cgi-bin/wals/search/conf',
>                #PRE_PROCESS     => 'config',
>            },
>        },

>
>When I run swish.cgi from a browser, I get this:
>Software Error
>Please check error log
>
>Yet, when I check the error log, it's empty.

Humm.  I think I've seen this with Template Toolkit.

>running./swish.cgi from a command line gives me an error too, here's the
>first part of it:
>./swish.cgi Base class package "Template::Base" is empty.
>        (Perhaps you need to 'use' the module which defines that package
>first.) at
>/usr/lib/perl5/5.8.0/i386-linux-thread-multi/Template.pm line 25
>BEGIN failed--compilation aborted at
>/usr/lib/perl5/5.8.0/i386-linux-thread-multi/Template.pm line 25.
>
>Does HTML::Template need to be installed?

No you are telling it to use Template Toolkit.  So that needs to be installed.

You can get it from these places if you install modules manually (which is
what I do - perl Makefile.PL && make && make test && make install)

   http://tt2.org/
   http://search.cpan.org/author/ABW/Template-Toolkit-2.08/

or if you use the CPAN module something like:

   # perl -MCPAN -e 'install Template'



-- 
Bill Moseley
mailto:moseley@hank.org
Received on Mon Dec 2 18:03:16 2002