[Templates] problems with %ENV when using TT from cron?
David Martin
designs at nolaflash.com
Tue Jan 29 22:31:01 GMT 2008
Thank you everyone for your help! Adding the INCLUDE_PATH to my config
solved the issue!
I appreciate your help very much!
David
> -----Original Message-----
> From: Josh Rosenbaum [mailto:josh at infogears.com]
> Sent: Tuesday, January 29, 2008 4:18 PM
> To: David Martin
> Cc: templates at template-toolkit.org
> Subject: Re: [Templates] problems with %ENV when using TT from cron?
>
> David Martin wrote:
> > Hi Josh,
> >
> > When your mail arrived I was trying the call like so
> >
> > $tt->process( '/www/foo/bar/baz/process_response.tt2', {
> > post_data => $post_data,
> > env => '\%ENV',
> > context => 'email',
> > confirm_key => $person->cs_code,
> > print_mailings => \@print_mailings
> > }, \$response ) || die $tt->error;
> >
> >
> > Can I call process with the full path? It succeeded from the command
> line
> > so I am guessing I can...
> >
> > When you say to add the path to INCLUDE_PATH do you mean push it to
> @INC? Or
> > is that a TT config? Or?
>
> I believe you can call process with the full path as long as you allow
> absolute paths when processing. That's usually a bad idea, though, since
> it's a security concern. See the absolute config option:
> http://template-toolkit.org/docs/manual/Config.html#section_ABSOLUTE
>
> The INCLUDE_PATH key is a TT config option:
> http://template-toolkit.org/docs/manual/Config.html#section_INCLUDE_PATH
>
> -- Josh
More information about the templates
mailing list