August 20, 2008
For ColdFusion hosting try HostMySite.com. |
Home /
Groups /
ColdFusion Talk (CF-Talk)
Coldfusion 8 0 1 Application cfc issue
I am quite lost on this one as I have not experienced this yet. We have an outside application that was built and I am trying to use 1 Application.cfc versus an Application.cfm. The application uses client variables so in the main cfc off the root, I have:Larry Schaberg 05/20/08 11:57 A Larry, I'm no expert but this is what works for me.Jason Durham 05/20/08 12:06 P I will give that a shot, but it actually seems like it is not looking for the file in the root directory and is only looking for the file in any sub directories.Larry Schaberg 05/20/08 12:14 P I am no expert either.Andrew Scott 05/20/08 12:16 P Is that something new? I have used the <cfapplication> with CFMX 7 and on CF 8 applications that I built outside of this particular application and they always work fine. I will give it a shot and see if changing from <cfapplication> to script elements will function better.Larry Schaberg 05/20/08 12:21 P Also, take a look at this:Dawson, Michael 05/20/08 12:23 P If you have used cfapplication in Application.cfc on all those versionAndrew Scott 05/21/08 12:56 A This did not work. It still tells me I have to set the client management.Larry Schaberg 05/20/08 12:25 P Have you checked your directories to make sure there are not errantIan Skinner 05/20/08 12:49 P Yes, I have looked in the 3 directory levels to ensure there are no application.cfm or application.cfc files and there are none.Larry Schaberg 05/20/08 12:54 P This isn't a valid Application.cfc file. Application.cfc doesn't use theBrian Kotek 05/20/08 12:37 P Not sure what to tell you then, except to keep looking. Application.cfcBrian Kotek 05/20/08 01:16 P Are you using any frameworks?Adam Haskell 05/20/08 09:08 P Hello Larry,David Stockton 05/21/08 05:16 A Are you on Linux or another case-sensitive OS? I believeBrad Wood 05/20/08 01:05 P No it is windows 2003.....Larry Schaberg 05/20/08 01:09 P If you place an H1 tag above the cfapplication tag with test text after it, does it display on the pages? This will at least help solidify if the page is being called correctly (but not processed correctly).William 05/20/08 01:17 P I am quite lost on this one as I have not experienced this yet. We have an outside application that was built and I am trying to use 1 Application.cfc versus an Application.cfm. The application uses client variables so in the main cfc off the root, I have: <cfapplication name="NameHere" clientmanagement="yes" sessionmanagement="yes" sessiontimeout="#createtimespan(0,24,0,0)#"> but in any directory I go to, if I do not have an application file in it, it gives an error that the client management must be enabled. Once I drop the file in that directory, the error goes away and the page loads fine. It appears as though CF is not looking in the above directory (root directory) for the application file. Assistance would be really appreciated. Larry, I'm no expert but this is what works for me. From within App.cfc.. ______________________________________________________________________ <cfcomponent output="no"> <cfscript> //Application properties THIS.Name = "myapp"; THIS.SessionManagement = true; THIS.ClientManagement = true; THIS.LoginStorage = "session"; THIS.SessionTimeout = createTimeSpan(0,0,30,0); </cfscript> ............... </cfcomponent> I am quite lost on this one as I have not experienced this yet. We have an outside application that was built and I am trying to use 1 Application.cfc versus an Application.cfm. The application uses client variables so in the main cfc off the root, I have: <cfapplication name="NameHere" clientmanagement="yes" sessionmanagement="yes" sessiontimeout="#createtimespan(0,24,0,0)#"> but in any directory I go to, if I do not have an application file in it, it gives an error that the client management must be enabled. Once I drop the file in that directory, the error goes away and the page loads fine. It appears as though CF is not looking in the above directory (root directory) for the application file. Assistance would be really appreciated. I will give that a shot, but it actually seems like it is not looking for the file in the root directory and is only looking for the file in any sub directories. ----- Excess quoted text cut - see Original Post for more ----- I am no expert either. But I'll tell you what is actually happening. When setting the application name, client enable etc. You will want to do this this.name = "Application Name" I suggest you read the docs, on application.cfc and setting Application Name. Now the reason could be one of two things, but here is what I see happening. <cfapplication> sets application variables. And application.cfc uses this variables. On Wed, May 21, 2008 at 1:55 AM, Larry Schaberg <ljschaberg@verizon.net> wrote: ----- Excess quoted text cut - see Original Post for more ----- Is that something new? I have used the <cfapplication> with CFMX 7 and on CF 8 applications that I built outside of this particular application and they always work fine. I will give it a shot and see if changing from <cfapplication> to script elements will function better. ----- Excess quoted text cut - see Original Post for more ----- Also, take a look at this: http://www.coldfusionjedi.com/downloads/application.cfc.txt m!ke Is that something new? I have used the <cfapplication> with CFMX 7 and on CF 8 applications that I built outside of this particular application and they always work fine. I will give it a shot and see if changing from <cfapplication> to script elements will function better. If you have used cfapplication in Application.cfc on all those version then you haven't read the Coldfusion tags/functions documents to well, then you are doomed for more bugs in your code. There is detailed information on how to use the Application.cfc, and it is not a normal Coldfusion template, but more of a cfc (component) than template. I suggest you do a search for cfapplication in your code and files. Also make sure where you are setting the details up in the Application.cfc, and double check any directory for Application.cfm that might be using cfapplication tag. I will tell you know, if you have the Application.cfc setup correctly it will work across all directories under it. The only time you will experience what you are experiencing is that the you have a rouge cfapplication in your code elsewhere. Again your first port of call would be to do a search for <cfapplication>, then search for application.cfm and Application.cfc that may have different values than you root Application.cfc Once you have eliminated them, your next port of call would be to run the line debugger and run the code line by line. This will solve were in the code is the issue. Of course all this information would have been in the Docs if you followed your debug procedure first. This list can't help you any more, we have told you what the problem is. It is now up to you do find the code that is causing the problem, as we have told you what the problem is. Also check your browser for cookies being enabled, but all in all if you followed standard debugging and elimination you would not have posted here. On Wed, May 21, 2008 at 2:19 AM, Larry Schaberg <ljschaberg@verizon.net> wrote: ----- Excess quoted text cut - see Original Post for more ----- This did not work. It still tells me I have to set the client management. ----- Excess quoted text cut - see Original Post for more ----- Have you checked your directories to make sure there are not errant local Application.cfm files overriding the global Application.cfc file? Yes, I have looked in the 3 directory levels to ensure there are no application.cfm or application.cfc files and there are none. >Have you checked your directories to make sure there are not errant >local Application.cfm files overriding the global Application.cfc file? This isn't a valid Application.cfc file. Application.cfc doesn't use the cfapplication tag. As other's have noted, you'll want to read up on Application.cfc or consult Ray's overview of it. Once you set it up correctly you'll find that it will work fine. On Tue, May 20, 2008 at 11:55 AM, Larry Schaberg <ljschaberg@verizon.net> wrote: ----- Excess quoted text cut - see Original Post for more ----- As I stated above, it still does not work. CF is acting as if it is not looking in the directory above it for the application.cfc If I copy/paste the file into that directory it works fine. The <cfapplication> even if it is not proper, which is a mute point right now, does work as I have used it for years in the application.cfc file. I have changed it to the proper way to do this and have noted I will have to change all other websites I have worked on to the proper way, but it is still not working and is still telling me that the management needs to be set. ----- Excess quoted text cut - see Original Post for more ----- Not sure what to tell you then, except to keep looking. Application.cfc definitely does what you're trying to do, so there simply has to be something else going on in your code or your setup. Are you positive there are not any lingering Application.cfm or Application.cfc files in the intermediary folders? Have you done an extended find for any other files that might have a cfapplication tag in them? On Tue, May 20, 2008 at 12:51 PM, Larry Schaberg <ljschaberg@verizon.net> wrote: ----- Excess quoted text cut - see Original Post for more ----- Are you using any frameworks? Adam On Tue, May 20, 2008 at 11:55 AM, Larry Schaberg <ljschaberg@verizon.net> wrote: ----- Excess quoted text cut - see Original Post for more ----- Hello Larry, Are you using the Adobe ColdFusion engine? Others (such as Railo) can have optimizations enabled to prevent looking up the structure for application files? If you're still having problems with this then Intergral (the makers of FusionReactor) can help. Check out our ColdFusion services here: http://www.fusion-reactor.com/services/cfservices.cfm Best regards, David ----- Excess quoted text cut - see Original Post for more ----- Are you on Linux or another case-sensitive OS? I believe Application.cfc needs to have the capital "A". ~Brad Yes, I have looked in the 3 directory levels to ensure there are no application.cfm or application.cfc files and there are none. >Have you checked your directories to make sure there are not errant >local Application.cfm files overriding the global Application.cfc file? No it is windows 2003..... ----- Excess quoted text cut - see Original Post for more ----- If you place an H1 tag above the cfapplication tag with test text after it, does it display on the pages? This will at least help solidify if the page is being called correctly (but not processed correctly). William Seiter (mobile) Have you ever read a book that changed your life? go to: http://www.winninginthemargins.com and use passcode: GoldenGrove No it is windows 2003..... ----- Excess quoted text cut - see Original Post for more ----- It does not display. It does on the pages that are in the same directory, but the subdirectories do not have the h1 displaying. ----- Excess quoted text cut - see Original Post for more ----- I figured it out on my way into work. I can't believe I missed it, but there are no files off the web root and the root of this application is in sub directories for some reason. Thank you all for trying to help me resolve it and informing me I was building the CFC incorrectly. Thanks, Larry ----- Excess quoted text cut - see Original Post for more -----
|
Mailing Lists
|
Latest Fusion Authority Articles
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||