[ic] New to Interchange, trying to upgrade from a VERY old version
cto at sca.org
Mon Dec 31 14:55:21 EST 2007
Good day, everyone.
I'm an experienced web developer, but new to Interchange, and have been
beating my head against the wall for weeks trying to get this working. I'm
ashamed to have to do this, but I'm afraid I need to come crawling to the
list for some advice. Basically, I'm trying to upgrade from an extremely
old version of Interchange that I had nothing to do with installing, to
This message is long, because I know nobody can help if I don't provide
sufficient information. I have spent the past two days working on this and
reading the online docs, but I still am confused on some points that are
apparently simple to everyone else. I must have a mental block for
some reason (I blame myself, not Interchange, for this, but it's still
frustrating because it's not often I find technical issues confusing).
Here's the situation:
* Nonprofit organization running a small-scale e-commerce site to sell
publications and logo merchandise. I am a part-time volunteer for this
organization, though I am a professional developer (in Java, not Perl)
in my regular job.
* We have an existing server up and running with a very old version, circa
4.8.x. I can't find a version number on the old server, but the binaries
are dated fall 2002. The old installation is running on an equally old
version of RedHat Linux. the old site was heavily themed with custom web
page templates by a developer who isn't around any more and for whom the
word "documentation" was apparently a cuss word. The web page that is
supposed to have docs for 4.8.x is just a TOC with all dead links, unless
I somehow found the wrong page.
* We have a new server running RedHat Enterprise Linux 4.0. I need to get
Interchange off of the old server and onto the new server quickly, because
this is the last app to migrate off that old server and it's costing us
hundreds of dollars per month in hosting fees until I can get it moved.
Once this app is moved, the old server can be decommissioned.
* I really need to upgrade to Interchange 5.4, but for now I'd settle for
getting the old version migrated over to the new server as-is.
* The old version uses all DBM files, but I think this was an abysmally
bad choice because we have a very nice replicated MySQL setup that I'd
much rather use. DBM is fine for shipping codes and other "constants",
but I want the product data, customer data, and order history to be
in SQL tables. I don't care where the sessions are stored. As a short-
term solution, though, I can live with DBM everywhere. I think I
understand how do to the conversion later based on what I've read in
* The other reason for wanting to move to SQL is that there is a homegrown
e-commerce app that I'd like to move into Interchange instead, but that
app's downstream processing requires that the order data be in SQL tables.
* I have full root access and MySQL administrator access on both servers.
* Our credit card processor is Authorize.net, but I think I can figure
out how to get that part working in Interchange. I just got done
migrating that homegrown app (see above) and am now intimately
familiar with Authorize.net's data protocols. This part I can
deal with! :-)
What I've done so far:
* Downloaded and built Interchange 5.4.1 and then 5.4.2, successfully.
I started this process in early 2007 with 5.4.1, got busy with other
things, and tabled it. When I came back to it recently, 5.4.2 was
current, and having no data to migrate, I upgraded.
* I have the sample store running successfully under 5.4.2, created
using "makecat", with one URL-related problem (see below).
* The Interchange daemon starts without errors under 5.4.2.
* I've tried just cloning the web DOCUMENT_ROOT directory and the
catalog directory from the old server to the new, hoping the old
catalog would "just work" under 5.4.2 with the updated link program,
but this failed miserably. I'm sure none of you are surprised, but
it seemed worth a try.
* I've tried movng the entire 4.8.x installation from the old server
to the new, but this doesn't even come close to working. There are
tons of Perl libraries that have different versions and just don't
work on the new server. I actually got the daemon to start, but
there are a pile of warnings, and I've decided this is a Very Bad
Idea for an e-commerce app. So, I've abandoned that approach.
* I've tried following the instructions for building a catalog from
scratch without makecat, http://www.icdevgroup.org/docs/iccattut/
This fails with the following error:
stockclerk /stockclerk/index.cgi Runtime error: Missing special
This is odd, because there is no mention of special_pages under the
* I figured out how to dump the DBM files out of the old server so that
I can migrate them into SQL tables once I get the new server running.
I'm quite comfortable with SQL, so for now I'll be happy if I can get
the new server running "empty", and load the product data later.
Now, all of the above being said, here are my main points of confusion:
* In my example setup, I can successfully bring up the catalog's main
page with https://myserver.example.org/test.cgi but all the links from
that page want to point to http://myserver.example.org/test.cgi. I thought
this was just a matter of setting SECURE_SERVER in variables.txt, and
restarting the Interchange daemon, but that didn't fix it. What have
I overlooked? (This is the highest priority of my questions, because
it's a show-stopper if I can't fix it.)
* What do I need to clone over from the old server to make the page layouts
the same as we had before? I'm sure I need to clone the pages directory,
but what else? And....Can an Interchange veteran tell me whether the
template language has substantially changed since the Dark Ages of 4.8?
Is there a template migration tool and/or guidebook?
I'm going to give this a try on my own, but I'm expecting trouble and
thought I'd better ask for some general guidance in parallel with
working on my own.
* The link program -- what is its relationship to the paths seen by Apache
(physical) and by the browser (virtual)? What I have running now is
https://myserver.example.org/test.cgi as the store URL, but this doesn't
match what I *though* I told makecat I wanted. In makecat, I specified
/test/index.cgi as the desired script. I don't understand what's going
on here. In the documentation, it says the name of the script is used
to determine the catalog name -- but there is no elaboration on how
that works when you use index.cgi in a subdirectory. Anyone care to
I'd like to use /test/incex.cgi if possible, as a friendlier URL. My
Apache config stipulates that index.cgi is an index document, so I
shouldn't have to specify it explicitly. Is the link program really
just a fancy version of "cat" that does an internal path map to the
CATALOG_ROOT and then copies the bytes after invoking Perl to do the
template substitutions? Or is it more complicated than that?
This isn't a huge issue -- I can live with /test.cgi, but if nothing
else I'd like to better understand how all this works, in case I need
to troubleshoot later.
* Is there any way to have the URL simply be https://mystore.example.org/
where "mystore" is the store name, and a single store is effectively
the entire virtual host? I've seen some online examples using Apache
mod_rewrite to achieve things like this, and I know how to do that sort
of thing, but it would seem to me there ought to be a way to do this
within Interchange itself. Not a huge issue, just desiderata in an ideal
I'd appreciate any commentary on the above issues, anything you think I'm
doing stupidly based on my descriptions of the project goals, and any
general advice on doing a migration from a really old version like 4.8.
Thanks for any suggestions or advice.
Scott Courtney, Chief Technology Officer, Society for Creative Anachronism
cto at sca.org http://www.sca.org/
More information about the interchange-users