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 »
10,638 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 »
10,638 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 »
10,638 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 »
10,638 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 »
10,638 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 »
10,638 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 »
1 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
InVision App - Prototyping Made Beautiful With Prototyping Tools Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
Feb 3, 2012 at 10:49 PM
How I Got Node.js Running On A Linux Micro Instance Using Amazon EC2
Wow this was really helpful! Only thing I would add is you need to update your .bash_profile after you edit the secure_path. This is what I did: $ . ~/.bash_profile Otherwise, NPM won't be found. ... read »
Feb 3, 2012 at 10:14 PM
Pushing Base64-Encoded Images Over HTML5 WebSockets With Pusher And ColdFusion
@Ben, Just wanted to let you know that pusher are soon to start limiting sizes on messages. This was the detail that came through in the Feb dispatch: "However, we will soon be limiting the s ... read »
Feb 3, 2012 at 5:05 PM
Regular Expressions Make CSV Parsing In ColdFusion So Much Easier (And Faster)
I tried using your RegEx in my C# program, but it was matching an extra empty-string at the end and so I would end up with an extra field that doesn't exist, so I changed it to this: (^|,)("(?: ... read »
Feb 3, 2012 at 3:47 PM
ColdFusion Supports HTTP Verbs PUT And DELETE (As Well As GET And POST)
Josh Cyr posted this on Twitter just a little bit ago. Thought it was appropriate. http://stackoverflow.com/questions/1619152/how-to-create-rest-urls-without-verbs/1619677#1619677 ... read »
Feb 3, 2012 at 2:28 PM
Changing The Execution Context Of Your Self-Executing Function Blocks In JavaScript
@Michael, You definitely make a good point (and extra points for quoting movies - I love movies). When you use a return() statement to define the object's public API, it does provide a consistent a ... read »
Feb 3, 2012 at 2:04 PM
Changing The Execution Context Of Your Self-Executing Function Blocks In JavaScript
To quote Jurassic Park: "Just because you can doesn't mean you should". I completely, utterly disagree with the thought that this is more readable. Consider the current module pattern: if ... read »
Feb 3, 2012 at 1:10 PM
REST API Design Rulebook By Mark Masse
@Jordan, Yeah, WRML was created by Mark Masse (author of the book). I also found it to be a bit convoluted. I suppose it is intended to allow the Client to be able to programmaticaly respond to cha ... read »
Feb 3, 2012 at 1:08 PM
ColdFusion Supports HTTP Verbs PUT And DELETE (As Well As GET And POST)
@Jason, To be honest, I don't have good answers for that kinds of stuff. And, to the point, that is specifically why I *really* liked the REST API Design Rulebook by Mark Masse - he just cuts throu ... read »