Ask Ben: Checking The ColdFusion Version

Posted July 14, 2006 at 2:44 PM by Ben Nadel

Tags: ColdFusion, Ask Ben

I don't have access to our server's cold fusion administrator. How can I tell what version of cold fusion we are running?

Checking your ColdFusion version could not be easier. All you have to do is dump out the SERVER scope. The version of ColdFusion is contained in a field titled "ColdFusion.ProductVersion." You should see a number like 7,0,1,116466. Additionally, the type license type of the system (ex. enterprise, developer, etc.) is in a field titled "ColdFusion.ProductLevel."

  • <!--- Dump out the server scope. --->
  • <cfdump var="#SERVER#" />
  •  
  • <!--- Store the ColdFusion version. --->
  • <cfset strVersion = SERVER.ColdFusion.ProductVersion />
  •  
  • <!--- Store the ColdFusion level. --->
  • <cfset strLevel = SERVER.ColdFusion.ProductLevel />


Reader Comments

Jun 23, 2009 at 12:23 PM // reply »
2 Comments

As a newbie, I am finding myself unable to connect to my ColdFusion 8 server and came across your valued information.

Could you kindly help me understand WHERE to put this code snippet?

Thanks in advance.


Jun 23, 2009 at 5:52 PM // reply »
11,246 Comments

@Jeannie,

You can put this code on any page. However, if you cannot connect to your ColdFusion server, you cannot run the above ColdFusion code.


Jun 26, 2009 at 10:49 AM // reply »
2 Comments

OK that is the heart of my problem. My ColdFusion runs beautifully on my XP, but I cannot get it to run on my Vista laptop.

Could you kindly direct me to help? I have googled and sought to fix this since June 6. I would be most grateful for assistance.

Kind regards,

Jeannie


Jun 29, 2009 at 8:54 AM // reply »
11,246 Comments

@Jeannie,

Did you install it as a stand-alone version?


Dec 3, 2009 at 12:23 AM // reply »
1 Comments

Thanks so much ben, i'm newbie here in coldfusion :)


Feb 23, 2010 at 7:52 PM // reply »
3 Comments

Thanks Ben! You saved me from having a heart attack. I thought a client's host was running CF 6 until I dumped the server scope ... whew, that was almost really bad ;)


Feb 23, 2010 at 8:39 PM // reply »
11,246 Comments

@Pedro,

Version 6?? I vaguely remember there being a version 6 ;)


Aug 2, 2010 at 8:52 AM // reply »
1 Comments

Will ColdFusion Server Enterprise 6,1,0,63958 version supports style attribute for cfchart?

I'm getting "Attribute validation error for tag chart." error


Aug 3, 2010 at 9:40 PM // reply »
11,246 Comments

@CFUser,

I guess not. I don't have access to anything less than CF8.


Aug 22, 2010 at 5:14 AM // reply »
4 Comments

Thanks Ben, Very informative article man.

But what if we want use Server Scoped Variables as pseudo-constructor in Application.cfc or Application.cfm?
In this case where we need to define Server Scoped Variables?


Aug 23, 2010 at 10:06 PM // reply »
11,246 Comments

@Sanoop,

In ColdFusion 9, you can now specify a ColdFusion component that defines an onServerStart() event handler. You can then, in the ColdFusion admin, point to this CFC to be used when the server initializes.

However, if you don't want to go that route, you can definitely use server-scoped variables within the Application.cfc pseudo-constructors; however, you just have to be careful that you don't reference a value before it's defined. You can define those in the Application.cfc if you want.

I don't typically store anything in the server scope so I don't have great advice on this matter.


Oct 4, 2010 at 2:42 PM // reply »
1 Comments

In our code base we have our own arrayFind() and arrayFindNoCase() for use on older version of CF.

Do you know if it is possible to conditionally declare/include these functions based on this version technique you've shown here?

I tried wrapping a cfscript block in a cfif but i don't think that works.


Oct 4, 2010 at 9:11 PM // reply »
11,246 Comments

@Howie,

While you can't wrap an entire CFFunction tag in conditionals, you can certainly wrap a CFInclude tag in conditionals.

  • <cfif (... NOT CF9 ...)>
  • <cfinclude template="my_array_fn.cfm" />
  • </cfif>

Or, you could always define them with some less-than-intuitive naming like:

  • <cffunction name="arrayFind_CF8">

... and then have logic to re-map the function to a more appropriate name:

  • <cfif (... NOT CF9 ...)>
  • <cfset arrayFind = arrayFind_CF8 />
  • </cfif>

... Using a conditional include (or a conditional CFC invocation) is probably the best so you don't end up with anything unnecessary. But, it comes down to how you currently define your user-defined functions.


Aug 9, 2011 at 6:09 AM // reply »
1 Comments

please give response ASAP. It is very importent to me.
can we disable admin console in the coldfusion Version: 6,1,0,63958

many thanks


Dec 16, 2011 at 4:13 PM // reply »
3 Comments

Hey Ben, thanks for the simple things. You're always there when I am searching... :-)

On another note, the "selected" parameter on this type of AJAX form element does not work with CF8, only CF9 in my experience. Do you know a quick workaround to achieve a similar result in CF8?

<cfselect name="serviceID"
bind="cfc:cfc.timer.getServices()"
bindonload="true"
selected="#getTimerData.serviceID#">
</cfselect>



Post A Comment

Comment Etiquette: Please do not post spam. Please keep the comments on-topic. Please do not post unrelated questions or large chunks of code. And, above all, please be nice to each other - we're trying to have a good conversation here.

Please review the following issues:

Author Name:


Author Email:

Author Website:

Comment:

Supported HTML tags for formatting: <strong>bold</strong>   <em>italic</em>   <code>code</code>







  • Help Wanted - Find Your Next ColdFusion Job
Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
May 25, 2013 at 10:08 AM
Using "//" And ".//" Expressions In XPath XML Search Directives In ColdFusion
@Ben, my question is that i want the current node with its tag and its parent node. i just want only that data. So, give me the solution for that. and remember solution is working on " xpath 1.0 ... read »
May 25, 2013 at 10:01 AM
Using "//" And ".//" Expressions In XPath XML Search Directives In ColdFusion
hey ben, i want get my current node tag and also want the root node tag withing. So, how can i fix it.. ! ... read »
May 24, 2013 at 5:39 PM
Ask Ben: Manually Enforcing Basic HTTP Authorization In ColdFusion
@Adam Oops! My mistake! I hadn't gotten that far in my testing - I'm still baby stepping my way through the process. ... read »
May 24, 2013 at 5:13 PM
Ask Ben: Manually Enforcing Basic HTTP Authorization In ColdFusion
Hi Jason, Thanks for checking up on that, but I still stand firm on my position. :) There are actually two listLast()'s in use, and you're right that the one using a space as a delimiter is fine. ... read »
May 24, 2013 at 4:45 PM
Ask Ben: Manually Enforcing Basic HTTP Authorization In ColdFusion
@Ben I have been lurking your site for quite some time, and haven't stepped up to comment until today. Thanks for all the great info - keep it up! @Adam I believe you are mistaken... as the commen ... read »
May 24, 2013 at 11:21 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@WebManWalking, Ha ha, let's us never speak of justifying "##" notation again :P ... read »
May 24, 2013 at 11:18 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Ben, Ah, so it was indeed how I vaguely remembered it to be: A direct assignment value = users.id[ i ] causes value to retain the sticky datatype of the query column. Although unnecessary in ... read »
May 24, 2013 at 9:11 AM
Preventing Links In Standalone iPhone Applications From Opening In Mobile Safari
@Brandon, Hi, No, I haven't been able to do that. I have just kept it as it is. ... read »
InVision App - Prototyping Made Beautiful With Prototyping Tools