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 />
Looking For A New Job?
- Senior Coldfusion Developer - Remote Position at MeetingPlay
- Senior ColdFusion / Mura Developer at Fig Leaf Software
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.
You can put this code on any page. However, if you cannot connect to your ColdFusion server, you cannot run the above ColdFusion code.
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.
Did you install it as a stand-alone version?
Thanks so much ben, i'm newbie here in coldfusion :)
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 ;)
Version 6?? I vaguely remember there being a version 6 ;)
Will ColdFusion Server Enterprise 6,1,0,63958 version supports style attribute for cfchart?
I'm getting "Attribute validation error for tag chart." error
I guess not. I don't have access to anything less than CF8.
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?
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.
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.
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" />
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 />
... 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.
please give response ASAP. It is very importent to me.
can we disable admin console in the coldfusion Version: 6,1,0,63958
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?
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?
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))>
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.
"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?"
Hi, is there any way to determine if you are running the cf code on a cf server or railo?