I guess you could stash it in a DB... CF and DB's are pretty tied together already, but I do hate having DB reliant code in the init, just cuz. But I don't hate it so much I don't do it myself, when I "have to" ;-).
Guess there's an example for when you're building CF "websites" or CF apps... it's different. Guess wish list item #2 would be some way for mapped paths to work on shared servers... #2 is more betterer than #1 though (fine grained debug control). Probably fundamentally undoable. (adding a mapped path without using cf admin). Good thing to think about though... if they use .htaccess maybe you could set a permission... ---> tangent: I figured out how to create Apache md5 passwords, in case someone wants to create users/passwords via CF. ("Figured out" is too strong: I found a java lib that crypts the password right;) Not the most secure method though... (.htaccess) (and avail. depends on the host's setup, OfCourse) :-/ :D (ps- there's always plain old encryption too. Six of one though... ) On 8/25/06, Will Tomlinson <[EMAIL PROTECTED]> wrote: > > Right now my config.xml file resides where it can be browsed and read > easily. Ray C. helped me a while back on how to secure it. One of the > options is to place outside the root and read it. This needs to work with a > shared host so that's not a good option. Another was to setup a > defaults.cfm file with the xml commented out. Then you read the file, > taking out the comments. If someone browses to the file, they'd see nothing. > > Could you use <cfxml> to do somethin along these lines? How does everyone > else do this? > Could I see some examples? Here's what I've got now. > > <!--- Read config.xml and save all the values for use in APPLICATION > scope---> > <cffunction name="loadApplicationVariables" returntype="void" > output="false"> > <cfset var serverName = "production"> > <cfset var xmlFilePath = "D:/inetpub/*******/****/config.xml"> > <!--- <cfset var xmlFilePath = > "C:/cfusionmx7/wwwroot/******/config.xml">---> > <cfset var key = ""> > <cfset var thevalues = ""> > <!--- Read and create a new CF XML document object---> > <cfset thevalues = XMLparse("#xmlFilePath#")> > <!--- Create a struct with the setting values---> > <cfset APPLICATION.settings = StructNew()> > <!--- Loop over the keys, saving their values to APPLICATION scope ---> > <cfloop item="key" > collection="#thevalues.settings[serverName]#"> > <cfset APPLICATION.settings[key] = thevalues.settings > [serverName][key].xmltext> > </cfloop> > </cffunction> > > Thanks, > Will > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251107 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4