Skip to main content
August 18, 2010
Question

CF9 unable to find/load Application.cfm

  • August 18, 2010
  • 2 replies
  • 1835 views

We have an application that is currently running in a CF mx 7 environment. It was deployed to CF 9 (9,0,0,251028) and when run throws an exception when accessing the client variables:

The requested scope CLIENT has not been enabled.

Before CLIENT variables can be used, the CLIENT state management system must be enabled using the cfapplication tag.

In the administration panel [Server Settings > Client Variables] I have a default storage mechanism selected.  In the root folder of the application I have my Application.cfm file and it makes the cfapplication declaration:

<cfapplication name="..."

    clientManagement="yes"

     setclientcookies="Yes"

     setDomainCookies="Yes"

     sessionManagement="no">

So it seems like all of the necessary pieces are in place and correct. After confirming that I checked if cf9 is even loading my Application.cfm file and it doesn't seem like it is.  Going back to the error page I reviewed the stack trace.  In order the Stack Trace displays the first template and then the index.cfm file.  I don't see Application.cfm anywhere.  In further testing I created a test variable in Application.cfm, both as

<cfset test = "hello world" />

and

<cfset Client.test = "hello world" />

Then I created a fresh blank index.cfm file.  It loads completly and does not throw an error.  I then, piece by piece, add simple html, it renders and confirms it's working as expected (hr and h2 tags).  I then call the test variables.  Both come up as undefined, in cases where they are both present or individually called.  Why wouldn't Application.cfm be loading?
Details
Windows server
CF 9 (not 9.1)

    This topic has been closed for replies.

    2 replies

    Inspiring
    August 18, 2010

    There was a recent posting similar to this, for a Windows-based server running CF, and the problem was that the "A" in application.cfm was capitalized.  Kinda shocked me, because most of my Application.cfm files are capitalized, and I don't have any problems, but the poster of that message said that changing the case fixed his problem.  I'm pretty sure that I've seen case sensitivity in the name of "onRequestEnd.cfm" at some point in the past.  Heck, it's worth a try.

    -reed

    August 18, 2010

    no dice! That's a good thought as I'm running apache and I think I read the same post which said that linux is case sensitive in this area.  But it does seem like it's expected to be Application.cfm, http://www.adobe.com/livedocs/coldfusion/6.1/htmldocs/appfra11.htm.

    After reviewing that article I placed a cfInclude tag pointing to the Application file.  It threw an exception on that saying it could not find the file (ah).

    Currently I do not have permissions, or can't find the blasted configuration on windows where it says "hide extension of known file types" - which is currently set to true.  After going into command line I find that Application.cfm is actually Application.cfm.prod (with .prod hidden). 

    After renaming it to Application.cfm I can confirm that it is now succesfully loading.  Now I can pull the keyboard from my forehead.

    Thanks for everyones help and suggestions!

    Participating Frequently
    August 18, 2010

    Could it be that you also have an Application.cfc file in the same directory as the Application.cfm? I believe that the Application.cfc file will take precedence.

    August 18, 2010

    No other Application file exists except for another Application.cfm further down two sub-directories.

    Participating Frequently
    August 18, 2010

    1. What is the default storage you have chosen for the client variables... database, cookie, registry, none?

    2. Can you turn on CF debugging so you can see the templates being executed and the paths of said templates?