Sunday, February 15, 2004

Further Clarification: Mach-II in a Shared Hosting Environment

A few more details came to light from a discussion on the Fusebox Forums, and thanks to Sean Corfield as usual for clarifying things.

To summarize, what the MACHII_APP_KEY variable does is sets the key in the Application scope struct that stores the data. In my case the issue I was seeing related to MACHII_APP_KEY was because I had installed the sample applications from the Mach-II site, and apparently others on my server had done the same thing, because unless I explicitly changed MACHII_APP_KEY to something other than the default (which just gets the path dynamically), it was apparently attempting to tap into someone else's key. Specifically I was seeing errors related to the application not being able to find MachII.framework.* CFCs, even though my copy of the Mach-II no longer has the default MachII.* calls anywhere in it.

The long and short of all of this is that in a shared environment you need to be careful about how you name your directories in your Mach-II applications because this directory name is in essence what determines the key in the application scope for your application. For names I think other people might be using (like the Mach-II sample apps) I've taken to putting the "SFS" prefix before everything (abbreviation for my company name, "Sixth Floor Software") and this seemed to do the trick. By the time my "real" project in a shared environment starts I should have these issues completely ironed out.

No comments: