Link to home
Start Free TrialLog in
Avatar of coolSri
coolSriFlag for United States of America

asked on

Need help with coldfusion application.cfc

Hi,

I have a coldfusion forum application. The application is pretty old and uses application.cfm file. But now I have changed the application.cfm file to cfc which is giving me a number of variety errors? I am basically new to coldfusion and I have no Idea why I am getting these errors.

1st error was when I was trying to create a <cfapplication tag which is
<cfapplication name="EUCOM" sessionmanagement="yes"
sessiontimeout=#CreateTimeSpan(0,0,20,0)#>

The error I am getting is 5 >= 0  

2ns one is I have a template included in application.cfc which in also has another template called queries/qry_forum.cfm. which was working fine when I was using application.cfm file. and after I changed cfm to cfc the error here is

Could not find the included template queries/qry_forum.cfm.

Can any one please help me with this.

Thanks in advance!

S
Avatar of jsimonuchc
jsimonuchc
Flag of United States of America image

Why did you chance the application.cfm to application.cfc? Application.cfm is a required file for ColdFusion applications. You cannot remove it. Your errors are probably happening because your application is looking for the application.cfm file.
Avatar of coolSri

ASKER

Because we are using coldfusion7. And in coldfusion 7 we need application.cfc instead of cfm.
Avatar of SidFishes
not correct...

all versions of CF can use application.cfm

application.cfc can be used with 7 & 8 but is -not- necessary
fyi ben nadel has a good tutorial on application.cfc here

http://www.bennadel.com/blog/726-ColdFusion-Application-cfc-Tutorial-And-Application-cfc-Reference.htm

as you can see it is sturctured very differently from applicition.cfm and can do a lot more however again applicition.cfm is fine to use in any version
Avatar of coolSri

ASKER

I know it works with cfm but what if I want to change it to CFC..?
ASKER CERTIFIED SOLUTION
Avatar of SidFishes
SidFishes
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of coolSri

ASKER

I have tried the above but it still giving the same errors. I will possible leave it as cfm itself. Thanks for all your help though.
as far as I'm concerned this is a "you can't" https://www.experts-exchange.com/help.jsp#hi405 answer (or you shouldn't asit could have unforseen effects on an existing app) and points should be awarded accordingly





Avatar of coolSri

ASKER

I did not get a possible solution for it. And what ever you have suggested I have already worked on it. So I guess it is not fair enough to award points.
Avatar of coolSri

ASKER

And it is not a you can't answer. Because we had other applications for which we changed .cfm file to .cfc(we need to work a little bit on it). I am not able to do it since I am new to this.
my point is this...

1) some applications could easily be changed to cfc with no impact
2) if you did change there's no way to provide a simple answer with what you have provided, especially since you "are new to this" the reason you are receiving errors is precisely due to what I said "it could have unforseen effects on an existing app"
3) there's no reason to change as I answered your post "And in coldfusion 7 we need application.cfc instead of cfm." That is incorrect and my answer -corrects- your misconception

but I'm out of here...

moderators...what ever you feel is fair

Avatar of coolSri

ASKER

Just because you have said cfc and cfm both work with coldfusion7 I need not award you points. I was looking for some kind of solution where I will be guided to change to cfc.  But all you could tell me is they both work for cf7 which is not what I was looking for and is no way close to my question. From the begining all you said was why do you want to change but not how to change. So I guess points should not be awarded.