[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Mike H, one step at a time
> From: interchange-users-admin@interchange.redhat.com
[mailto:interchange-
> users-admin@interchange.redhat.com] On Behalf Of Paul Jordan
>
> Hi Mike.
>
> I just got my first dedicated server! I am in the process of
implementing
> the usertag you wrote for sooftgoods. I had to wait until I had my
server,
> and access to interchange.cfg. Anyways, you remember this portion of
the
> code:
>
> >UserTag enable-download Order resource
> >UserTag enable-download addAttr
> >UserTag enable-download Routine <<EOR
> >sub {
> > my ($resource, $opt) = @_;
> >
> > my $docroot = $opt->{document_root} ||
$::Variable->{DOCROOT};
> > my $dl_dir = $opt->{base_dir} || 'tmp_download';
> > my $server = $opt->{server} ||
$::Variable->{SERVER_NAME};
> >
> > ## Routine comes from Vend::Util
>
> Well, When I restarted interchange, I got some barewords errors, See I
> substituted www.imagemogul.com for SERVER_NAME. It didn't like it. The
> barewords errors pointed me to the server name. SO I thought I could
use
> my
> IP address for SERVER_NAME.
>
> When I restarted, I didn't get any errors.
My guess would be to leave the code the way it is and let IC pull the
actual SERVER_NAME from your catalog. The Variable->{SERVER_NAME}
should be defined in your variable database. With it setup this way you
can use this code for multiple catalogs/servers without having to edit
the actual module. You may also want to have a development catalog
called dev.imagemogul.com and a live site called www.imagemogul.com .
If you hard code the server name or ip this code will only work for one
of the catalogs.
> My question is, since this is my first tweaking on the server level,
Is it
> OK to sub the IP address in there? Am I doing something that is bad
> practice?
Probably not a good idea let IC do the variable substitution and set
your server name in the catalog.cfg or variable database.
>
> Thanks again for the great code.
>
> Paul
Good luck,
-Ron