[ic] Autoload - can't get it to work

Jonathan Clark interchange-users@icdevgroup.org
Mon Jan 13 08:05:01 2003


> > > I'm trying to use Autoload.  I cannot get it to work, even
> > using the basic
> > > code below.  I've restarted Interchange and checked the
> > logs, Interchange
> > > restarts fine.
> > >
> > > Here's my code:
> > >  In /interchange/catalog.cfg:
> > >
> > >   Autoload <<EOS
> > >   [perl]
> > >   $Scratch->{mook} = "Test";
> > >   return;
> > >   [/perl]
> > >   EOS
> > >
> > > Then, on the index page I try to display the value using
> > [scratch mook],
> > > nothing appears. I've restarted Interchange and checked the logs,
> > > Interchange restarts fine.  I have noticed that when I move
> > the Autoload
> > > code up towards the beginning of catalog.cfg then I get an
> > error when
> > > restarting Interchange.
> > >
> > > What am I missing?
>
>
>
> >
> >
> > One (possibly daft) suggestion..
> >
> > check the 'EOS' to make sure there is no white space after it.
> >
> > When you move the code up the catalog.cfg, and it fails, what
> > is in the
> > error log?
> >
> > Jonathan
> > www.webmaint.net
> >
> >
>
> Hi Jonathan
>
> There are no white spaces after the EOS
>
> Here are the lines from the error log:
>
> - - - [13/January/2003:09:17:44 +0000] - - STOP server (14421) on signal
> TERM
> - - - [13/January/2003:09:17:47 +0000] - - Interchange V4.9.6
> - - - [13/January/2003:09:17:48 +0000] - - sit config error:
> Please specify
> the MailOrderTo directive in the configuration file ''
> - - - [13/January/2003:09:17:48 +0000] - - sit: config error. Skipping.
> - - - [13/January/2003:09:17:49 +0000] - - START server (23995) (UNIX)
> - - - [13/January/2003:09:17:49 +0000] - - START server (23995) (UNIX)
>
> Only reference to in catalog.cfg is "MailOrderTo     __ORDERS_TO__"

(from conversation on the phone) I know that the 'please specify the
MailOrderTo directive' happened when the autoload routine was placed at the
top of the catalog.cfg file.

This indicates that the 'VariableDatabase' directive has not been read..
which means that the Autoload routine right at the top has not been
terminated correctly.

Try editing the file directly on the server using vi or your favourite
editor to put your routine in.

Jonathan
www.webmaint.net