Skip to main content
Ben Nadel at NCDevCon 2011 (Raleigh, NC) with: Christian N. Abad
Ben Nadel at NCDevCon 2011 (Raleigh, NC) with: Christian N. Abad

Ask Ben: Checking The ColdFusion Version

By
Published in , Comments (19)

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 />

Want to use code from this post? Check out the license.

Reader Comments

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.

15,848 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.

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

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 ;)

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

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?

15,848 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.

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.

15,848 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.

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

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>

1 Comments

Hi Ben,

I've got an unusual circumstance where I don't have access to the cfadmin AND I can't go through the change request process to add a file dumping the server scope. Are there any configuration files (like the neo-*.xml files) that would give the precise version number?

1 Comments

Thanks Ben! This was helpful. Here is my example taken from your example to get a version number

<cfset coldFusionServerVersion = left(SERVER.ColdFusion.ProductVersion, find(',', SERVER.ColdFusion.ProductVersion))>
1 Comments

Hi Ben,
I have the same question as John Longo of obtaining the CF version without going into the adminconsole or dumping server scope. My installation is CF10 on WebSphere.
>>John Longo>>
"Hi Ben, I've got an unusual circumstance where I don't have access to the cfadmin AND I can't go through the change request process to add a file dumping the server scope. Are there any configuration files (like the neo-*.xml files) that would give the precise version number?"

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel