Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Memory Variables override in CFApplication? 1

Status
Not open for further replies.

markbanker

Programmer
Mar 6, 2001
37
US
I have looked to 4 resources for the answer to my question, and they all gave the same response...but I remain confused.

In order to use Memory Variables, I need to check the appropriate box to enable them in the ColdFusion Administrator. This allows me to set Application or Session variables in the application.cfm page.

I may also set default and maximum values for Application and Session variables. This is done in the Coldfusion Administrator.

If I set default and maximum values, they apply server-wide and thus override any application.cfm variables I set. Is this correct? That's what the Macromedia online documentation says, along with a Macromedia Coldfusion 5 book I consulted. I also looked in a Sybex reference, which says the same thing.

I don't get it. Why would I want to do that? It seems that I should be able to set server-wide values that I can choose to override in my application.

Comments? Clarifications?

Thanks for any input you can give.

Mark
 
There is a reason why allaire called it the CF ADMINISTATOR. If you think abou it, it wouldn't be much of and administrator if others could overwrite it's settings.

To conceptualize a real life scenario:

Think about web hosts that support Coldfusion. Typically, the host will have many, many people using the same CF server. Now obviously this host cannot trust that every one of their clients will write clean/good/non malicious cf code. The CF Administrator enables the host to have control over what can happen on the CF Server itself. If a client could override the settings, then there would be no point in having the Administrator in the first place - in essence, you would have many administrators (the cf authors).. and that just aint a good idea.
 
Thanks tooled. I understand and agree with what you are saying. So, if there are defaults and max values set in the administrator, it is pointless to use them in the application.cfm, correct?

If it is my server, and I manage all of the CF apps on the site, I might enable them but not set defaults, thus passing responsibility to the individual apps, which is when it would be required to set the values in the application.cfm.

Is this correct?

Mark
 
hmm, that's an interesting way of looking at it. In a general sense I would say yes to "Is this correct?".

In a literal sense, CF Admin never "passes" any responsiblity.
 
Specifically, I am speaking about the SESSIONTIMEOUT and APPLICATIONTIMEOUT. In order to create these in the application.cfm, I must enable Memory Variables in the CF Admin.

Is it your opinion that this shouldn't be done; that those values should be set in the Admin only?

Mark
 
It is my opinion that they should be set in both - admin and application. My reasoning is based on the idea that I always like to have an overall idea/plan of my server settings. I like to have the least amount of wholes as possible.

Note that the admin sets the default AND the max value.

Default = if you don't set a value in your application, then the value set in the admin will be used.

Max = If you do set a value in the application and the value is greater than the value that is set in the admin, then the admin value will be used. In other words, the application value cannot exceed the value in the admin - if it does, the admin value wins.
 
Thank you, tooled. I kept missing the point of what default means....if you don't set a value, use this one.

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top