• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Application.cfc doesn't run??

Contributor ,
Aug 11, 2009 Aug 11, 2009

Copy link to clipboard

Copied

I did a project for a customer and it worked great on my test site. So I bundled it all up and sent it off to her. She put it on her host and it didn't work. The error said that there was no session variables defined. So she finally let me in to look and make sure everything was as it should be. Sure enough, all the templates were there. I put in a test page just doing a simple setting of a test session variable and then outputting that variable on another page. Didn't work.

Seemed obvious to me. The host didn't have session variables enabled for some reason. Upon contacting them, they told me I had to use cookies to set session variables just like in ASP and PHP. I sent them the adobe docs on session variables and explained how to enable them. Today I get back an email saying "We put in an application.cfm file setting session management to TRUE and now it works" They tried then to explain to me how screwed up I was.

HOWEVER, there is an application.cfc file in there. Very standard one. Sets the session management and timeouts. But for some reason that cfm file is being read but NOT the cfc.

Is it possible to turn off cfcs? At first I said "wow, they must be on CF5 or earlier".  They claim they are on 8. The only thing I can think of is that *.cfc is not set up in IIS. Any other ideas?

TOPICS
Advanced techniques

Views

1.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Aug 11, 2009 Aug 11, 2009

Copy link to clipboard

Copied

<cfdump var="#server#">

Put that in your test file.  It will show exacty what version of ColdFusion you are dealing with.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 11, 2009 Aug 11, 2009

Copy link to clipboard

Copied

Are you insinuating that they are not being honest about which version they are on? lol

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Aug 11, 2009 Aug 11, 2009

Copy link to clipboard

Copied

Or confused... It would not be the first time that I have heard of an ISP right hand that did not know what it's left hand was doing|did|done.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 11, 2009 Aug 11, 2009

Copy link to clipboard

Copied

Any other ideas?

Coldfusion wouldn't see application.cfc! That must be capital A.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Aug 11, 2009 Aug 11, 2009

Copy link to clipboard

Copied

Good Catch!!!

That is indeed important on unix flavored ColdFusion installs.

You can get by with sloppy naming on windows server where Application.cfc and application.cfc are the same files and either spelling will be called by the CF engine.  But on a unix server these are seperate and distinct files and ONLY the Application.cfc file will be called.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 12, 2009 Aug 12, 2009

Copy link to clipboard

Copied

LATEST

Dunno... when the documentation takes such great pains to point out the importance of this issue, and does not discuss "platforms" when doing so, I'll believe them and capitalize that filename.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 11, 2009 Aug 11, 2009

Copy link to clipboard

Copied

The only thing I can think of is that *.cfc is not set up in IIS.

You can test it. Save the following code as TestComponent.cfc.

<cfcomponent output="false">
    <cffunction name="f" returntype="String">
        <cfreturn "It works!">
    </cffunction>
</cfcomponent>

In the same directory, create and run a CFM page containing the line

<cfoutput>#createobject("component","testComponent").f()#</cfoutput>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation