Re: Application.cfm/c
That is an excellent suggestion. I think we could probably do this for new servers going forward. Thanks ~Byron Byron Mann Lead Engineer & Architect HostMySite.com On Wed, Sep 25, 2013 at 4:13 PM, Jochem van Dieten wrote: > > On Wed, Sep 25, 2013 at 5:39 AM, Byron Mann wrote: > > > Our admins are telling me that we run into issues with customers on our > > shared platform not having one. (they didn't specify the issues in the > > email). > > > > It has been a while since I last set up a server for shared hosting, but I > used to put an Application.cfc in a parent folder which would display a > short message that an Application.cfc/m was required and then cfabort it. > It used to be just for logging (some logfiles will have the application > name with each logline), but with application specific settings available > you want people to make sure they have one so they can deal with their own > mappings. > > Jochem > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356842 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Application.cfm/c
On Wed, Sep 25, 2013 at 5:39 AM, Byron Mann wrote: > Our admins are telling me that we run into issues with customers on our > shared platform not having one. (they didn't specify the issues in the > email). > It has been a while since I last set up a server for shared hosting, but I used to put an Application.cfc in a parent folder which would display a short message that an Application.cfc/m was required and then cfabort it. It used to be just for logging (some logfiles will have the application name with each logline), but with application specific settings available you want people to make sure they have one so they can deal with their own mappings. Jochem ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356841 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Application.cfm/c
*"On CF10, application and session scope seem to work without an Application.cf* file in a parent directory"* I haven't been able to produce that. I can set "session" and application variables, but it's not really a session or application, just a simple structure. Example below the timestamps keep changing, if sessions and application variables were enabled, you would expect them to not change. param name="session.time" default=now(); param name="application.time" default=now(); writeDump(session); writeDump(application); Their thinking seems to be that requiring an application file is somehow going to increase stability and performance of the server, and I'm just not seeing that. Uploading a default is just going to result in it being overwritten anyhow 75% of the time. I had a meeting with them and set them straight. Byron Mann Lead Engineer & Architect HostMySite.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356840 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Application.cfm/c
On Wed, Sep 25, 2013 at 10:45 AM, Nando wrote: > > The question to ponder here is what an *empty* default Application.cfc file > is going to achieve? Not much, I believe. > I've totally ignored the whole rest of the thread, so pardon me if this is dumb. But an empty App.cfc *would* accomplish something. It would ensure that an App.cfc higher up the food chain doesn't fire. You may want to prevent aht. > > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356839 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Application.cfm/c
The question to ponder here is what an *empty* default Application.cfc file is going to achieve? Not much, I believe. You can set per application mappings in an Application.cf* file, (from CF9 I think?) which is *very* helpful on shared hosting, but an empty Application.cfc file isn't going to do that. On CF10, application and session scope seem to work without an Application.cf* file in a parent directory on my quick tests. So it seems all an Application.cf* file can do is alter server defaults and provide a place to manage your application. On Wed, Sep 25, 2013 at 5:00 PM, Byron Mann wrote: > > They got back to me, I think I pretty much shot down their theories. > > 1- Application scopes are still present without an application.cf* file > and > shared across all sites with no app file > 2- Garbage Collection performs better when applications are defined > 3- Poor structure which leads to more support calls, for things like server > settings that can be modified on a per-app basis > > 1 - False to best of my knowledge, unless there is a file further up the > directory structure, which there shouldn't be. Plus, I'm thinking the > sandboxes would prevent that file from loading anyhow. I tested this > theory on 7/8/10 and was not able to produce the issue, except when I put > an app file in a higher directory. Did not try with a sandbox enabled. > 2 - I'm not a GC guru, but I would think having less in memory usage > (application, sessions) would result in just the opposite. > 3 - We have many more poor coding practices to address for customers than > this. Like requesting 10 day timeouts for session variables, etc. > > Background is, they are pushing to upload a default application.cfc to the > webroot for new sites. I'm shooting it down with my thinking that > application.cfc takes precedence over application.cfm. Which a good number > of customer sites still use, and would result in many broken customer sites > out of the box. > > I'm correct in thinking it just searches up the file system structure to > the system root right? No CF mappings or any other craziness occurs? I > think in 10 you can even set the server to stop looking up beyond the > webroot. > > > Byron Mann > Lead Engineer & Architect > HostMySite.com > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356837 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Application.cfm/c
They got back to me, I think I pretty much shot down their theories. 1- Application scopes are still present without an application.cf* file and shared across all sites with no app file 2- Garbage Collection performs better when applications are defined 3- Poor structure which leads to more support calls, for things like server settings that can be modified on a per-app basis 1 - False to best of my knowledge, unless there is a file further up the directory structure, which there shouldn't be. Plus, I'm thinking the sandboxes would prevent that file from loading anyhow. I tested this theory on 7/8/10 and was not able to produce the issue, except when I put an app file in a higher directory. Did not try with a sandbox enabled. 2 - I'm not a GC guru, but I would think having less in memory usage (application, sessions) would result in just the opposite. 3 - We have many more poor coding practices to address for customers than this. Like requesting 10 day timeouts for session variables, etc. Background is, they are pushing to upload a default application.cfc to the webroot for new sites. I'm shooting it down with my thinking that application.cfc takes precedence over application.cfm. Which a good number of customer sites still use, and would result in many broken customer sites out of the box. I'm correct in thinking it just searches up the file system structure to the system root right? No CF mappings or any other craziness occurs? I think in 10 you can even set the server to stop looking up beyond the webroot. Byron Mann Lead Engineer & Architect HostMySite.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356836 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Application.cfm/c
Your admins might be referring to the idea that some OTHER application.cfm/c is being called when none is in the root of the site. These are issues that can generally be resolved but they have to be understood. I'd get more info. -Original Message- From: Byron Mann [mailto:byronos...@gmail.com] Sent: Tuesday, September 24, 2013 10:39 PM To: cf-talk Subject: Application.cfm/c Trying to wrap my head around any implications around not using an application file. Our admins are telling me that we run into issues with customers on our shared platform not having one. (they didn't specify the issues in the email). I can see how non-unique application names might be an issue, but I'm failing to see any pitfalls to not having one. If anything I would say it would improve performance, since you could not use application, session and client scope, thus using less memory utilization. Looking for any experience where this may have been an issue before I talk to them tomorrow. Byron Mann Lead Engineer & Architect HostMySite.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356835 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Application.cfm/c
I would assume the specific issues would be the crux of the matter. Without them, it is difficult to speculate. In regards to performance, the scopes you mention are often used to increase performance in well designed applications. If the server doesn't have enough resources to accommodate their use, then yes, performance will suffer, but the primary reason is a lack of server resources, not the use of application, session and client scopes. On Wed, Sep 25, 2013 at 5:39 AM, Byron Mann wrote: > > Trying to wrap my head around any implications around not using an > application file. > > Our admins are telling me that we run into issues with customers on our > shared platform not having one. (they didn't specify the issues in the > email). > > I can see how non-unique application names might be an issue, but I'm > failing to see any pitfalls to not having one. If anything I would say it > would improve performance, since you could not use application, session and > client scope, thus using less memory utilization. > > Looking for any experience where this may have been an issue before I talk > to them tomorrow. > > Byron Mann > Lead Engineer & Architect > HostMySite.com > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356834 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Application.cfm/c
Well if they are not using any client, application or session vars or any of the other features then I guess they do not need one. In which case a non unique app name is not really needed either as there is nothing in the application of any interest to anyone. Altho a site that simple usually doesn't even need cf I have found and there are usually not many pages even with any cfml in them, often just .cfm for the sake of an include. I have found such sites are better candidates for wordpress. Russ Michaels www.michaels.me.uk cfmldeveloper.com cflive.net cfsearch.com On 25 Sep 2013 04:39, "Byron Mann" wrote: > > Trying to wrap my head around any implications around not using an > application file. > > Our admins are telling me that we run into issues with customers on our > shared platform not having one. (they didn't specify the issues in the > email). > > I can see how non-unique application names might be an issue, but I'm > failing to see any pitfalls to not having one. If anything I would say it > would improve performance, since you could not use application, session and > client scope, thus using less memory utilization. > > Looking for any experience where this may have been an issue before I talk > to them tomorrow. > > Byron Mann > Lead Engineer & Architect > HostMySite.com > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356833 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Application.cfm default behaviors
> Yeah, it said Application.cfm... > > I'm working on a legacy app, (on CF 9) that uses an Application.cfm, > which I cant rebuild right now. > inside of the file, there is a custom structure set called CFA., it's > part of a home grown "framework". > > Would it automatically be dropped into the application scope, in v.9 > ie: application.cfa.whatever. or is it living and dying by the > request, even though it's being set in Application.cfm Unless it's specifically in the Application scope, it will be local to the page running the request. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347766 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Application.cfm default behaviors
I'm pretty sure it's living and dying by the request. In application.cfm: ...is: ...and not: On Wed, Sep 28, 2011 at 8:33 AM, Scott Stewart wrote: > > Yeah, it said Application.cfm... > > I'm working on a legacy app, (on CF 9) that uses an Application.cfm, > which I cant rebuild right now. > inside of the file, there is a custom structure set called CFA., it's > part of a home grown "framework". > > Would it automatically be dropped into the application scope, in v.9 > ie: application.cfa.whatever. or is it living and dying by the > request, even though it's being set in Application.cfm > > > > -- > -- > Scott Stewart > Adobe Certified Instructor, ColdFusion 8 & 9 > Adobe Certified Expert, ColdFusion 8 & 9 > > Blog: http://www.sstwebworks.com > Email: webmas...@sstwebworks.com > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347765 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
Dave, I never said that neither way was improper. What I stated was that the tag cfabort was introduced to satisfy the needs of developers who needed a way to abort the page for debugging purposes. I never talked about developers could not figure out what cfabort is for, what I am saying is that when you begin to make changes to the application one will end up scratching their heads as to why some snippet of code is not working, only to find that a developer 2-10 years ago wrote dodgy code that put a cfabort into a template when there is no need to do that. It is all about letting the natural process continue for that exact reason, and you wonder why ColdFusion gets a bad name. Anyone who picks up an Application and then has to scratch their heads to figure out why something is not working, has to waste time going through the code to figure out why, and that to me screams bad decision making at the time that snippet of code was written. Dave, you can argue things that I have not actually said, or you can imply what you think I mean. You will never change my mind that you should avoid using cfabort, than what it was intended for and what 99.99% of people actually do use it for. Sure there are many things in ColdFusion that one could do it this way or that, and then we are right back to the dark ages of spaghetti code, and people bagging the language because they believe the work flow to be badly written. The point is that Claude made it very clear that he is not using onRequestEnd.cfm, he also made it very clear that he likes to output data and then do a cfabort to make sure the page has ended, and I will ask for what real benefit? Now, what if he decided to reuse this code in another template only to find that he has to rewrite that code, because something new needs to run that code, then fails to run he then has to find another way to do his job. So why not write it as if you are intending to reuse the code in the first place, and that there is a huge potential that one might want to call this code from another template. It doesn't take an Einstein to work out that if you are looking at exciting the template there are more better and efficient ways of doing it, that is my point and I will say it again, you will not change my mind on this. IF a developer can't take the initiative to make their jobs easier, whether it be now or 10 years from now, then I have no time for those people because they are caught up in the moment, and not thinking about the what ifs when it comes to their style of coding. I mean we are hear discussing this, because bad code was written in the first place. Sure you can do it the way Claude has done it, does it make it work right, well it did then but not anymore. And that just makes my point even stronger. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Dave Watts [mailto:dwa...@figleaf.com] > Sent: Wednesday, 29 June 2011 1:44 AM > To: cf-talk > Subject: Re: application.cfm > > > > No Dave, I look at what the next developer or I might be doing in > > 6-12months time. I think that people should look at the problem at > > hand now and the future, and foresee maybe things might change. Would > > it no be better to write something properly now, rather than scratch > > your head and then rewrite the code again later when you requirements > change? > > You continue to assume that, because you prefer one way of doing things, > the other isn't "proper". But that continued assumption doesn't make it true. > I can't imagine a developer having trouble figuring out how CFABORT works. > If such a developer exists, he would be better suited to employment in > another field. > > Anyway, this will be my last response to this thread. You have done > something I didn't think possible - make me agree with Claude. > Clearly, this marks the beginning of the apocalypse. > > Dave Watts, CTO, Fig Leaf Software > http://www.figleaf.com/ > http://training.figleaf.com/ > > Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA > Schedule, and provides the highest caliber vendor-authorized instruction at > our training centers, online, or onsite. > > ~~ > ~~~| > Order the Adobe Coldfusion Anthology now! > http://www.amazon.com/Adobe-Coldfusion- > Anthology/dp/1430272155/?tag=houseoffusion > Archive: http://www.houseoffusion.com/groups/cf- > talk/message.cfm/messageid:345856 > Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm > Unsubscribe: http://www.houseoffusion.com/groups/cf- > talk/unsubscribe.cfm ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/143
Re: application.cfm
> No Dave, I look at what the next developer or I might be doing in 6-12months > time. I think that people should look at the problem at hand now and the > future, and foresee maybe things might change. Would it no be better to > write something properly now, rather than scratch your head and then rewrite > the code again later when you requirements change? You continue to assume that, because you prefer one way of doing things, the other isn't "proper". But that continued assumption doesn't make it true. I can't imagine a developer having trouble figuring out how CFABORT works. If such a developer exists, he would be better suited to employment in another field. Anyway, this will be my last response to this thread. You have done something I didn't think possible - make me agree with Claude. Clearly, this marks the beginning of the apocalypse. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345856 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
No Dave, I look at what the next developer or I might be doing in 6-12months time. I think that people should look at the problem at hand now and the future, and foresee maybe things might change. Would it no be better to write something properly now, rather than scratch your head and then rewrite the code again later when you requirements change? Have a think about that. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Dave Watts [mailto:dwa...@figleaf.com] > Sent: Wednesday, 29 June 2011 1:04 AM > To: cf-talk > Subject: Re: application.cfm > > Yes, fine. The key word there is "personally". But you seem to make the > jump from personal preference to defining that preference as a best > practice, and that's what I object to. > > Dave Watts, CTO, Fig Leaf Software > http://www.figleaf.com/ > http://training.figleaf.com/ > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345852 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
If your not going to cfabort until after the final HTML tag, than doesn't that rather defeat the point. On Tue, Jun 28, 2011 at 4:26 PM, <> wrote: > > >> incorrect blanket statements > > I think this is exactly what I was looking for when I wrote "gratuitous > statement", I hope this is correct too ;-) > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345851 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>> incorrect blanket statements I think this is exactly what I was looking for when I wrote "gratuitous statement", I hope this is correct too ;-) ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345847 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>> your HTML will not get rendered correctly if you simply abort a page, which may result in your friendly error message not being displayed properly, if at all. Yet another grtuitous statement... Your HTML will not get rendered correctly if you do not write it correctly, period. ;-) Ex: do not validate form fields after opening a table or a div, or close them before you CFEXIT, this is elementary. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345844 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
> What does efficiency have to do with it? You tell me: " I can show you many ways to rewrite it and be more efficient without using cfabort." > You will not change my mind on the use of cfabort, pure and simple. I'm not really interested in changing your mind. I am interested in disagreeing with what I think are incorrect blanket statements like "never use CFABORT". > CFError was introduced to capture errors, and it does a good job of it too. That's very true, but I'm not sure how it's especially relevant here. If you simply want to abort processing, CFABORT is perfectly good for this. If you want to show the user a bit of text before you abort processing, CFABORT still is perfectly good for this. > But my question is if you are not using onRequestEnd.cfm what does it matter > if you > use cfabort or not? Personally I would tentd to not use it ... Yes, fine. The key word there is "personally". But you seem to make the jump from personal preference to defining that preference as a best practice, and that's what I object to. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345838 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
not to mention the fact that your HTML will not get rendered correctly if you simply abort a page, which may result in your friendly error message not being displayed properly, if at all. So i'd have to agree with Andrew that this really belongs in the realms of debugging not on a production site or you are just asking for trouble. But to each his own, you can also smoke cigarettes at a gas station if you want, but I would really suggest not doing it :-) Russ On Tue, Jun 28, 2011 at 3:52 PM, Andrew Scott wrote: > > What does efficiency have to do with it? > > You will not change my mind on the use of cfabort, pure and simple. CFError > was introduced to capture errors, and it does a good job of it too. But my > question is if you are not using onRequestEnd.cfm what does it matter if > you > use cfabort or not? Personally I would tentd to not use it, because there > might come a time when you need to use the onRequestEnd.cfm for other > things > and you will end up scratching your head trying to work out why it is not > getting run. > > Just the same as one has used a CFML template to deliver a PDF, that is an > actual cfml template again. Enough said.. > > > > Regards, > Andrew Scott > http://www.andyscott.id.au/ > > > > > > -Original Message- > > From: Dave Watts [mailto:dwa...@figleaf.com] > > Sent: Wednesday, 29 June 2011 12:52 AM > > To: cf-talk > > Subject: Re: application.cfm > > > > > > > Pfft, never ever heard that you display then use cfabort. Sorry but > > > you not going to ever convince me that cfabort is a good thing in any > > > way shape or form, except for debugging purposes. I can show you many > > > ways to rewrite it and be more efficient without using cfabort. > > > > If you want to stop processing, and not generate an HTTP error, there's > > nothing wrong with using CFABORT. In any case, I can't imagine what > metric > > you're using to measure efficiency. > > > > Dave Watts, CTO, Fig Leaf Software > > http://www.figleaf.com/ > > http://training.figleaf.com/ > > > > Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA > > Schedule, and provides the highest caliber vendor-authorized instruction > at > > our training centers, online, or onsite. > > > > ~~ > > ~~~| > > Order the Adobe Coldfusion Anthology now! > > http://www.amazon.com/Adobe-Coldfusion- > > Anthology/dp/1430272155/?tag=houseoffusion > > Archive: http://www.houseoffusion.com/groups/cf- > > talk/message.cfm/messageid:345833 > > Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm > > Unsubscribe: http://www.houseoffusion.com/groups/cf- > > talk/unsubscribe.cfm > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345836 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
What does efficiency have to do with it? You will not change my mind on the use of cfabort, pure and simple. CFError was introduced to capture errors, and it does a good job of it too. But my question is if you are not using onRequestEnd.cfm what does it matter if you use cfabort or not? Personally I would tentd to not use it, because there might come a time when you need to use the onRequestEnd.cfm for other things and you will end up scratching your head trying to work out why it is not getting run. Just the same as one has used a CFML template to deliver a PDF, that is an actual cfml template again. Enough said.. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Dave Watts [mailto:dwa...@figleaf.com] > Sent: Wednesday, 29 June 2011 12:52 AM > To: cf-talk > Subject: Re: application.cfm > > > > Pfft, never ever heard that you display then use cfabort. Sorry but > > you not going to ever convince me that cfabort is a good thing in any > > way shape or form, except for debugging purposes. I can show you many > > ways to rewrite it and be more efficient without using cfabort. > > If you want to stop processing, and not generate an HTTP error, there's > nothing wrong with using CFABORT. In any case, I can't imagine what metric > you're using to measure efficiency. > > Dave Watts, CTO, Fig Leaf Software > http://www.figleaf.com/ > http://training.figleaf.com/ > > Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA > Schedule, and provides the highest caliber vendor-authorized instruction at > our training centers, online, or onsite. > > ~~ > ~~~| > Order the Adobe Coldfusion Anthology now! > http://www.amazon.com/Adobe-Coldfusion- > Anthology/dp/1430272155/?tag=houseoffusion > Archive: http://www.houseoffusion.com/groups/cf- > talk/message.cfm/messageid:345833 > Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm > Unsubscribe: http://www.houseoffusion.com/groups/cf- > talk/unsubscribe.cfm ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345834 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
> Pfft, never ever heard that you display then use cfabort. Sorry but you not > going to ever convince me that cfabort is a good thing in any way shape or > form, except for debugging purposes. I can show you many ways to rewrite it > and be more efficient without using cfabort. If you want to stop processing, and not generate an HTTP error, there's nothing wrong with using CFABORT. In any case, I can't imagine what metric you're using to measure efficiency. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345833 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
Pfft, never ever heard that you display then use cfabort. Sorry but you not going to ever convince me that cfabort is a good thing in any way shape or form, except for debugging purposes. I can show you many ways to rewrite it and be more efficient without using cfabort. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Claude Schnéegans [mailto:=?ISO- > 8859-1?Q?Claude_Schn=E9egans 1?Q?ue.com=3E?=] > Sent: Tuesday, 28 June 2011 11:02 PM > To: cf-talk > Subject: Re: application.cfm > > > >>Thats what cfthrow and cfrethrow are for. > > No. > This is to trigger an execution error in the system. > This kind of errors are not to be reported to the user. > > If all you want is to warn the user he has done something wrong, you just > need to display some message in the returned page and that's it. > Ex : "You entered an invalid date"... then abort! > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345830 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>>Thats what cfthrow and cfrethrow are for. No. This is to trigger an execution error in the system. This kind of errors are not to be reported to the user. If all you want is to warn the user he has done something wrong, you just need to display some message in the returned page and that's it. Ex : "You entered an invalid date"... then abort! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345824 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
Thats what cfthrow and cfrethrow are for. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Claude Schnéegans [mailto:=?ISO- > 8859-1?Q?Claude_Schn=E9egans 1?Q?ue.com=3E?=] > Sent: Monday, 27 June 2011 11:06 PM > To: cf-talk > Subject: Re: application.cfm > > > >>Actually cfabort was introduced as a debugging tag. > > > Really? > Note that I use CFABORT because I was not sure CFCONTENT will cause > processing to stop. > It is not specified in the docs, but it does, so I could remove the CFABORT tag > after CFCONTENT> > > There is still a good reason for CFABORT: stop processing after displaying an > error message in application.cfm. > This is not debugging, but HTTP request validation. > I have plenty of validation done in application.cfm. > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345818 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>>Actually cfabort was introduced as a debugging tag. Really? Note that I use CFABORT because I was not sure CFCONTENT will cause processing to stop. It is not specified in the docs, but it does, so I could remove the CFABORT tag after CFCONTENT> There is still a good reason for CFABORT: stop processing after displaying an error message in application.cfm. This is not debugging, but HTTP request validation. I have plenty of validation done in application.cfm. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345754 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>>Or you may simply not want to waste time processing code that's unnecessary for a specific request. ... and you might even use no onRequestEnd at all ;-) ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345753 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
> Actually cfabort was introduced as a debugging tag. No, it wasn't. It was introduced to allow the programmer to halt the current program. While it can be useful for debugging, it's not specific to debugging. I'm pretty sure that CFABORT has been around since the very beginning of CFML. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345752 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
> Actually I can't think of one. Well, I can think of a couple offhand. For example, you might have some code that generates HTML output in onRequestEnd.cfm, and you might have some scripts that generate something other than HTML. Or you may simply not want to waste time processing code that's unnecessary for a specific request. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345751 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
Actually it wasn't that clear at all. Look I am bowing out now, I will not be ridiculed by someone who found it hard to comprehend that what he was doing was wrong and then gets defensive about it when people are trying to actually understand what he is doing. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Russ Michaels [mailto:r...@michaels.me.uk] > Sent: Monday, 27 June 2011 5:45 AM > To: cf-talk > Subject: Re: application.cfm > > > Andew, it has been said several times that the problem was caused by a user > link to the file directly, it is not caused by cfcontent, thus why it got compiled. > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345750 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
Actually cfabort was introduced as a debugging tag. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Claude Schnéegans [mailto:=?ISO- > 8859-1?Q?Claude_Schn=E9egans 1?Q?ue.com=3E?=] > Sent: Monday, 27 June 2011 2:27 AM > To: cf-talk > Subject: Re: application.cfm > > > >> just weird seeing cfabort rather than > which is better as you know that the application will eventually fall down to > onRequestEnd.cfm were as cfabort will not. > > > When you use CFCONTENT to deliver content, there is nothing else needed > to be done, except terminate the process, which is CFABORT is intended for. > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345749 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
Actually I can't think of one. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Dave Watts [mailto:dwa...@figleaf.com] > Sent: Monday, 27 June 2011 2:42 AM > To: cf-talk > Subject: Re: application.cfm > > > > No there isn't, just weird seeing cfabort rather than > method="exittemplate" /> which is better as you know that the > > application will eventually fall down to onRequestEnd.cfm were as cfabort > will not. > > In many cases you might not want onRequestEnd.cfm to execute. > > Dave Watts, CTO, Fig Leaf Software > http://www.figleaf.com/ > http://training.figleaf.com/ > > Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA > Schedule, and provides the highest caliber vendor-authorized instruction at > our training centers, online, or onsite. > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345748 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
Andew, it has been said several times that the problem was caused by a user link to the file directly, it is not caused by cfcontent, thus why it got compiled. On Sun, Jun 26, 2011 at 5:07 PM, Andrew Scott wrote: > > Dave, > > Really I didn't get that from his posts.. > > The part that I am struggling with is the actual PDF itself, regardless of > whether it is called via a cfml template or not. I strongly believe that if > you are using cfcontent to deliver a file with the extension of PDF then it > *SHOULD* not compile that file, only the template it is being called from. > > I saw the code, I read the code but it was not very clear if the PDF in > question also had the cfm extension or not, and after re-reading everything > I still don't see that mentioned. > > > Regards, > Andrew Scott > http://www.andyscott.id.au/ > > > > -Original Message- > > From: Dave Watts [mailto:dwa...@figleaf.com] > > Sent: Monday, 27 June 2011 1:39 AM > > To: cf-talk > > Subject: Re: application.cfm > > > > > > > I did Claude (But I stated a possible bug), because I still am > > > struggling because you don't share the code, to how you are including > > > or loading the PDF. In other words I think there is a solution but I > > > would need to see the code and the offending PDF to help further. > > > > No, he did post all the code, but you also have to put that together with > the > > fact that the code is invoked when a user directly requests one of his > PDFs: > > > > http://claudes_server/somefile.pdf.cfm > > > > So, the compiler attempts to compile somefile.pdf.cfm before running the > > code he posted in Application.cfm. > > > > Dave Watts, CTO, Fig Leaf Software > > http://www.figleaf.com/ > > http://training.figleaf.com/ > > > > Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA > > Schedule, and provides the highest caliber vendor-authorized instruction > at > > our training centers, online, or onsite. > > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345745 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
> No there isn't, just weird seeing cfabort rather than method="exittemplate" /> which is better as you know that the application > will eventually fall down to onRequestEnd.cfm were as cfabort will not. In many cases you might not want onRequestEnd.cfm to execute. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345744 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
> The part that I am struggling with is the actual PDF itself, regardless of > whether it is called via a cfml template or not. I strongly believe that if > you are using cfcontent to deliver a file with the extension of PDF then it > *SHOULD* not compile that file, only the template it is being called from. That's what confused me as well. If you're using CFCONTENT to deliver a file, that won't cause it to be compiled. But that's not all he's doing, and I think he made that clear in subsequent posts. > I saw the code, I read the code but it was not very clear if the PDF in > question also had the cfm extension or not, and after re-reading everything > I still don't see that mentioned. I'm pretty sure I saw it mentioned in one of them, but I always have a bit of trouble understanding Claude's posts - no fault on his part there, just a bit of language barrier on my part I guess. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345743 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>> just weird seeing cfabort rather than which is better as you know that the application will eventually fall down to onRequestEnd.cfm were as cfabort will not. When you use CFCONTENT to deliver content, there is nothing else needed to be done, except terminate the process, which is CFABORT is intended for. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345742 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>> I strongly believe that if you are using cfcontent to deliver a file with the extension of PDF then it *SHOULD* not compile that file, only the template it is being called from. What you don't understand is that the file somefile.pdf.cfm IS the actual somefile.pdf file simply renamed somefile.pdf.cfm. Then it is compiled BEFORE application.cfm is run and can CFCONTENT the file. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345741 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
No there isn't, just weird seeing cfabort rather than which is better as you know that the application will eventually fall down to onRequestEnd.cfm were as cfabort will not. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Dave Watts [mailto:dwa...@figleaf.com] > Sent: Monday, 27 June 2011 1:40 AM > To: cf-talk > Subject: Re: application.cfm > > 2) Why do you have cfabort in your code, this screams bad coding. > > Cfabort means that you no longer want ColdFusion to continue on any > more processing. > > Personally I would rewrite the code in a manner that no longer uses > > the cfabort. I know this is not the problem, but that is not what I > > would consider good programming habits. > > There is nothing wrong with using CFABORT. > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345740 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
Dave, Really I didn't get that from his posts.. The part that I am struggling with is the actual PDF itself, regardless of whether it is called via a cfml template or not. I strongly believe that if you are using cfcontent to deliver a file with the extension of PDF then it *SHOULD* not compile that file, only the template it is being called from. I saw the code, I read the code but it was not very clear if the PDF in question also had the cfm extension or not, and after re-reading everything I still don't see that mentioned. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Dave Watts [mailto:dwa...@figleaf.com] > Sent: Monday, 27 June 2011 1:39 AM > To: cf-talk > Subject: Re: application.cfm > > > > I did Claude (But I stated a possible bug), because I still am > > struggling because you don't share the code, to how you are including > > or loading the PDF. In other words I think there is a solution but I > > would need to see the code and the offending PDF to help further. > > No, he did post all the code, but you also have to put that together with the > fact that the code is invoked when a user directly requests one of his PDFs: > > http://claudes_server/somefile.pdf.cfm > > So, the compiler attempts to compile somefile.pdf.cfm before running the > code he posted in Application.cfm. > > Dave Watts, CTO, Fig Leaf Software > http://www.figleaf.com/ > http://training.figleaf.com/ > > Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA > Schedule, and provides the highest caliber vendor-authorized instruction at > our training centers, online, or onsite. > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345739 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
> 1) Why are you using application/octet-stream instead of the PDF one? Are > you going to be using other file types here? My guess is that his application doesn't keep track of the MIME types for individual files. > 2) Why do you have cfabort in your code, this screams bad coding. Cfabort > means that you no longer want ColdFusion to continue on any more processing. > Personally I would rewrite the code in a manner that no longer uses the > cfabort. I know this is not the problem, but that is not what I would > consider good programming habits. There is nothing wrong with using CFABORT. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345738 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
> I did Claude (But I stated a possible bug), because I still am struggling > because you don't share the code, to how you are including or loading the > PDF. In other words I think there is a solution but I would need to see the > code and the offending PDF to help further. No, he did post all the code, but you also have to put that together with the fact that the code is invoked when a user directly requests one of his PDFs: http://claudes_server/somefile.pdf.cfm So, the compiler attempts to compile somefile.pdf.cfm before running the code he posted in Application.cfm. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345737 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>>The alternative, though, would be for the executing process to run your first program before compiling the second, which sounds like it would be generally an inefficient thing to do - the more times control has to be passed from one process to another, the longer things generally take. And compilation generally only happens once - the first time the file is requested. Not really a big deal: the compiler is called again every time you CFINCLUDE some file anyway. This may happen many times during execution of only one template. Now if an included template is not compiled before it is indeed included, I don't why it could not be the same for the HTTP requested template ie: not being compiled before application.cfm passes control to it. It just happens it is not the way it works, but it is certainly not for any kind of logical or efficiency reason. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345736 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>>Yes you did but I also asked for the PDF in question so that I could run some tests as well, maybe you missed that:-) I didn't miss it. The content of the pdf has absolutely no interest. I told you it hapened to contain somewhere a string ">Anyway I have a couple of questions. Now look, I've posted all details here, including the code, if you don't understand it, just forget it. I was using a pdf under a .cfm extension just to force execution of an application.cfm. Once this template is executed, the true pdf file is returned to the requester, there is no need to execute any other template, especialy a pdf file, then it aborts. The customer asked to have times every document was requested to be traced. I know there plenty of other ways to do it, the problem was that the CMS was already designed to generate direct links to the files using the true file name, ie: Title of the file. I didn't want to change the code for Title of the fileeverywhere a document was called. The way I did it, Title of the file had the advantage to be compatible with documents previously uploaded in the system, without having to change any thing in the database structure nor in the existing pages. Only the new document would be counted. I now know that there is rare cases it won't work, I'm rewriting the module differently, and I need the help of nobody to do it, thanks anyway. I was just asking a question here, not help. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345735 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
Yes you did but I also asked for the PDF in question so that I could run some tests as well, maybe you missed that:-) Anyway I have a couple of questions. 1) Why are you using application/octet-stream instead of the PDF one? Are you going to be using other file types here? 2) Why do you have cfabort in your code, this screams bad coding. Cfabort means that you no longer want ColdFusion to continue on any more processing. Personally I would rewrite the code in a manner that no longer uses the cfabort. I know this is not the problem, but that is not what I would consider good programming habits. As I stated if you want to send this to me off list I will be more than happy to have a look at it for you. Regards, Andrew Scott http://www.andyscott.id.au/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345726 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>>because you don't share the code I did sent all the code, you probably missed it. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345724 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
No. Happy now? -- WSS4CF - WS-Security framework for CF http://wss4cf.riaforge.org/ On 26 June 2011 07:19, <> wrote: > My question was "is it possible to get around this". ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345721 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
I did Claude (But I stated a possible bug), because I still am struggling because you don't share the code, to how you are including or loading the PDF. In other words I think there is a solution but I would need to see the code and the offending PDF to help further. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Claude Schnéegans [mailto:=?ISO- > 8859-1?Q?Claude_Schn=E9egans 1?Q?ue.com=3E?=] > Sent: Sunday, 26 June 2011 9:19 AM > To: cf-talk > Subject: Re: application.cfm > > > >>CF will attempt to compile it. > > My assumption was it was not compiled if not executed, but from my very > first post I know it is not the case. > My question was "is it possible to get around this". > I got about 50 answers to explain what I already knew, but none to my > question. > So I conclude that there is probably no way to have CF work differently, this > is a reasonable assumption. > I also conclude that no one knows a way to have CF work differently, and this > is a certitude, > > >>This is not a bug, but the intended behavior. > > No one said it was a bug. > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345717 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
> My assumption was it was not compiled if not executed, but from my very first > post I know it is not the case. > My question was "is it possible to get around this". > I got about 50 answers to explain what I already knew, but none to my > question. > So I conclude that there is probably no way to have CF work differently, this > is a reasonable assumption. > I also conclude that no one knows a way to have CF work differently, and this > is a certitude, No, there is no way you can have CF conditionally compile programs. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345715 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>>CF will attempt to compile it. My assumption was it was not compiled if not executed, but from my very first post I know it is not the case. My question was "is it possible to get around this". I got about 50 answers to explain what I already knew, but none to my question. So I conclude that there is probably no way to have CF work differently, this is a reasonable assumption. I also conclude that no one knows a way to have CF work differently, and this is a certitude, >>This is not a bug, but the intended behavior. No one said it was a bug. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345712 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
> hasn't this all been said several times already ? It doesn't appear to have been said simply and clearly, no. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345683 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
hasn't this all been said several times already ? On Sat, Jun 25, 2011 at 5:59 PM, Dave Watts wrote: > > > Until we see the code that delivers the PDF, you have to look at what is > > causing the compile error. It has nothing to do with when one is compiled > or > > not, or what order it is compiled in. ColdFusion will always compile > > application.cfm/application.cfc and then the template you are trying to > run, > > and onRequestEnd.cfm if you have it. It can't do it any other way, > because > > it has to know what variables might be defined in the application.cfm. > > No, in fact it has everything to do with this. The user is requesting > a URL that looks like this: > > http://claudes_crazy_server/somedir/somefile.pdf.cfm > > That file will be compiled before the Application.cfm file runs. That > file is causing a compilation error before Application.cfm runs, in > this case. > > Dave Watts, CTO, Fig Leaf Software > http://www.figleaf.com/ > http://training.figleaf.com/ > > Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on > GSA Schedule, and provides the highest caliber vendor-authorized > instruction at our training centers, online, or onsite. > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345681 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
> Until we see the code that delivers the PDF, you have to look at what is > causing the compile error. It has nothing to do with when one is compiled or > not, or what order it is compiled in. ColdFusion will always compile > application.cfm/application.cfc and then the template you are trying to run, > and onRequestEnd.cfm if you have it. It can't do it any other way, because > it has to know what variables might be defined in the application.cfm. No, in fact it has everything to do with this. The user is requesting a URL that looks like this: http://claudes_crazy_server/somedir/somefile.pdf.cfm That file will be compiled before the Application.cfm file runs. That file is causing a compilation error before Application.cfm runs, in this case. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345679 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
> > My guess is that the compiler takes lots of extra time and resources, so it > > does all its work before getting into the execution process. > > May be, however it will also compile some files for nothing, ie: included > files actually not included at execution... which represents an extra > overhead. > There is even a drawback that can even be condidered as a bug (don't know if > it is still there in CF 9) : duplicate functions defined in two diferent > includes although only one template is included at execution. No optimization process is perfect. The alternative, though, would be for the executing process to run your first program before compiling the second, which sounds like it would be generally an inefficient thing to do - the more times control has to be passed from one process to another, the longer things generally take. And compilation generally only happens once - the first time the file is requested. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345678 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
> >>In Claude's original question, it doesn't appear he's using CFCONTENT: > > Yes I am. > Here is a summary of the code in application.cfm: > You can see that the requested file is never executed nor intended to. > The only purpose of the .cfm extension is to force the execution of the > application.cfm Thus, as described in my previous response: "If you give a file a .cfm extension and invoke that file in an HTTP request on a server configured to run CF, for all intents and purposes that file is CFML, whether it contains any CFML tags or functions or not. And CF will compile it, and this is not a bug, but the intended behavior." The fact that you're using CFCONTENT later on is a "red herring" - the fact is, you have a .cfm file and you're requesting it via HTTP. That file is therefore treated as a CF file. CF will attempt to compile it. This is not a bug, but the intended behavior. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345677 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
wow this has dragged on a bit. I think perhaps the point is being missed, so let me have a go for you. The pdf file is never normally executed, so therefore you believe it should never be compiled either, which is a correct assumption if you are just delivering the file with with CFCONTENT, as it should never be touched with the cfcompiler. However i'm sure you said earlier that the reason for the problem was because someone was directly trying to access the file, in which case CF will of course try to compile and execute it as this is how cf works, and this is the only reason you have not had this problem before is because no-one has previously tried to link to the .pdf.cfm file. As Andrew has explained to you, JRUN will try to compile all the files within a request first before it executes anything, as it cannot execute CFML, only class files, regardless of whether the application.cfm is executed first or not. So the only way to avoid this is to make sure the .pdf.cfm file cannot be linked to directly, and you have been given several ways to achieve this. Russ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345592 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>>My guess is that the compiler takes lots of extra time and resources, so it >>does all its work before getting into the execution process. May be, however it will also compile some files for nothing, ie: included files actually not included at execution... which represents an extra overhead. There is even a drawback that can even be condidered as a bug (don't know if it is still there in CF 9) : duplicate functions defined in two diferent includes although only one template is included at execution. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345590 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
I believe you are correct that the answer is no and that process seems perfectly logical and correct. Here is how I see the process running... By the way this is not actual knowledge of the process, but how I've always assumed that the process occurred. 1) Request is received by web server and is passed to cf. 2) CF sees which page it needs and checks to see if there is a compiled version of the template in memory or a class file on disk. 3) If there is, happily run the compiled byte code in the appropriate order. ! 4) If not, compile the template. If that template references any other templates check each of those for compiled versions, if not then compile those as well. 5) Process the now compiled files in the appropriate order. The compiler and the executor are two different processes in CF. My guess is that the compiler takes lots of extra time and resources, so it does all its work before getting into the execution process. However like I said before I don't know any of this for sure, it's just how I understand the process. All that being said, unless there is a real need to futz with extensions, all extensions should match their filetype. PDF should be .pdf, Excel should be .xls, etc. In general it makes life a lot easier. Steve My question was "is it possible to have CF compile a template requested in the url only if it is executed", so far the answer is no. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345588 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>>I think you don't understand, I think you don't understand that I perfectly understand what's hapening: Although I assumed the template (pdf file) should not be compiled since never executed, it IS compiled. This causes the syntax error and stops execution. >>You are not taking into consideration that the PDF is the cause of this error I know perfectly that the pdf is causing the error. I told you this is because it contains a string like "http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345584 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
So what you are now saying is that your method will not work, and you have been lucky to this date to not run into it. Until we see the code that delivers the PDF, you have to look at what is causing the compile error. It has nothing to do with when one is compiled or not, or what order it is compiled in. ColdFusion will always compile application.cfm/application.cfc and then the template you are trying to run, and onRequestEnd.cfm if you have it. It can't do it any other way, because it has to know what variables might be defined in the application.cfm. The problem that you can't comprehend is that you are wrong. Like I said in another post, I give up trying to help you now. You have been told to look at what is causing the error, the error is the PDF. You have admitted that another PDF will work fine, so what makes your template and this PDF crash with an excpetion, and stop compiling the code? Now I know for a fact that Application.cfc/Application.cfm is the first thing in the chain, it has to be executed before the template you are calling, because if it didn't you can't access those variables that you define in there, now can you? Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Claude Schnéegans [mailto:=?ISO- > 8859-1?Q?Claude_Schn=E9egans 1?Q?ue.com=3E?=] > Sent: Thursday, 23 June 2011 11:50 PM > To: cf-talk > Subject: Re: application.cfm > > > >>Now if you are 100% confident that your PDF is being delivered by the > cfcontent tag, then it sounds like you may have come across a bug. > > No, the pdf is not delivered in case of an error, since it is a compile error, no > code is executed. > For years I've been using this trick, and no file even contained any occurrence > of the string " Note that any file containing anything except " compiler with no problem. It was the case for years. > > And it is not a bug in CF if this is what you mean, is is just the way it works. > As I said, it could have been > 1. compile application.cfm > 2. execute application.cfm... and eventually abort here. > 3. compile the requested template > 4. execute it > > It is rather > 1. compile application.cfm AND the requested template 2. execute > application.cfm... and eventually abort here. > 4. execute the requested template > > There may be a good reason I don't know to do things in that order, but it is > certaily not pure logic. > > > ~~ > ~~~| > Order the Adobe Coldfusion Anthology now! > http://www.amazon.com/Adobe-Coldfusion- > Anthology/dp/1430272155/?tag=houseoffusion > Archive: http://www.houseoffusion.com/groups/cf- > talk/message.cfm/messageid:345577 > Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm > Unsubscribe: http://www.houseoffusion.com/groups/cf- > talk/unsubscribe.cfm ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345583 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
Sorry I am bowing out now, you have a pre-conceived notion that it is to do with the compilation of the template. You are not taking into consideration that the PDF is the cause of this error, by your own admission and it has nothing to do with where you are thinking it is, until you look away from what you are thinking and go with what everyone has told you, will you be able to fix this. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Claude Schnéegans [mailto:=?ISO- > 8859-1?Q?Claude_Schn=E9egans 1?Q?ue.com=3E?=] > Sent: Thursday, 23 June 2011 11:41 PM > To: cf-talk > Subject: Re: application.cfm > > > >>I will ask another question, is this application.cfm in the directory of the > template in question, > > Yes, of course, and it include higher lever application.cfm > > >>But you really need to work out why it is trying to compile the PDF as a > CFML template, > > Again, since application.cfm is to be executed prior the template specified in > the url, and since the code in the application.cfm could redirect the request > to another template, or simply abort the request, I thought the requested > template would be compiled only after application.cfm execution and only if > it was to be actually executed. > This would have been logical after all, but it is not the way it works: both > application.cfm AND the template are compiled first, THEN application.cfm is > executed. > It could have been that application is compiled and executed FIRST, then the > template is compiled and executed if application passes control to it. > Since my application.cfm always terminates on a CFABORT, the requested > template is NEVER executed, and there is no reason it should be compiled. > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345582 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
I think you don't understand, CF will try to compile the templates before execution, provided there are no compile time errors. If there is it will abort compiling the templates. And I believe and although I am not 100% sure you will find that all files in the execution of that request are removed, which is why you might be thinking what you are thinking. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Claude Schnéegans [mailto:=?ISO- > 8859-1?Q?Claude_Schn=E9egans 1?Q?ue.com=3E?=] > Sent: Thursday, 23 June 2011 11:41 PM > To: cf-talk > Subject: Re: application.cfm > > > >>I will ask another question, is this application.cfm in the directory of the > template in question, > > Yes, of course, and it include higher lever application.cfm > > >>But you really need to work out why it is trying to compile the PDF as a > CFML template, > > Again, since application.cfm is to be executed prior the template specified in > the url, and since the code in the application.cfm could redirect the request > to another template, or simply abort the request, I thought the requested > template would be compiled only after application.cfm execution and only if > it was to be actually executed. > This would have been logical after all, but it is not the way it works: both > application.cfm AND the template are compiled first, THEN application.cfm is > executed. > It could have been that application is compiled and executed FIRST, then the > template is compiled and executed if application passes control to it. > Since my application.cfm always terminates on a CFABORT, the requested > template is NEVER executed, and there is no reason it should be compiled. > > > > ~~ > ~~~| > Order the Adobe Coldfusion Anthology now! > http://www.amazon.com/Adobe-Coldfusion- > Anthology/dp/1430272155/?tag=houseoffusion > Archive: http://www.houseoffusion.com/groups/cf- > talk/message.cfm/messageid:345575 > Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm > Unsubscribe: http://www.houseoffusion.com/groups/cf- > talk/unsubscribe.cfm ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345581 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
> This is the first time it happens in about 10 years I've bee using this > method. > I thought the template would never be compiled because of CFABORT in > application.cfm, now I see it is not the case. Since the problem has happened once in 10 years, I would try to open the PDF in Acrobat Pro and do a Save As while reducing the size or updating some of the tags. See if you can get the "http://www.linkedin.com/pub/roger-austin/8/a4/60 Twitter: http://twitter.com/RogerTheGeek ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345580 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>>Now if you are 100% confident that your PDF is being delivered by the cfcontent tag, then it sounds like you may have come across a bug. No, the pdf is not delivered in case of an error, since it is a compile error, no code is executed. For years I've been using this trick, and no file even contained any occurrence of the string "http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345577 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>>I will ask another question, is this application.cfm in the directory of the template in question, Yes, of course, and it include higher lever application.cfm >>But you really need to work out why it is trying to compile the PDF as a CFML template, Again, since application.cfm is to be executed prior the template specified in the url, and since the code in the application.cfm could redirect the request to another template, or simply abort the request, I thought the requested template would be compiled only after application.cfm execution and only if it was to be actually executed. This would have been logical after all, but it is not the way it works: both application.cfm AND the template are compiled first, THEN application.cfm is executed. It could have been that application is compiled and executed FIRST, then the template is compiled and executed if application passes control to it. Since my application.cfm always terminates on a CFABORT, the requested template is NEVER executed, and there is no reason it should be compiled. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345575 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
Right, that means that there is a problem with the way your are trying to deliver the PDF and why it is throwing an error. Now if you are 100% confident that your PDF is being delivered by the cfcontent tag, then it sounds like you may have come across a bug. Feel free to ping me off list with your application.cfm and the template in question and the PDF and I will have a look at it for you. And tell me which version of ColdFusion you are trying to run this against. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Claude Schnéegans [mailto:=?ISO- > 8859-1?Q?Claude_Schn=E9egans 1?Q?ue.com=3E?=] > Sent: Thursday, 23 June 2011 11:29 PM > To: cf-talk > Subject: Re: application.cfm > > > >>You keep talking about templates being compiled, if there is an error as > you have mentioned this will stop the compile of the template and it will look > like it is being complied before the other. > > > This is what happens indeed. There a compile error because the pdf file > happens to contain some bytes that look like a CF tag, then it causes a > compile error and the application.cfm is not even executed. > This is the first time it happens in about 10 years I've bee using this method. > I thought the template would never be compiled because of CFABORT in > application.cfm, now I see it is not the case. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345574 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>>You keep talking about templates being compiled, if there is an error as you have mentioned this will stop the compile of the template and it will look like it is being complied before the other. This is what happens indeed. There a compile error because the pdf file happens to contain some bytes that look like a CF tag, then it causes a compile error and the application.cfm is not even executed. This is the first time it happens in about 10 years I've bee using this method. I thought the template would never be compiled because of CFABORT in application.cfm, now I see it is not the case. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345573 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
You keep talking about templates being compiled, if there is an error as you have mentioned this will stop the compile of the template and it will look like it is being complied before the other. I will say this again, the problem is not when it gets compiled but how you are doing it. And I will be honest you have far too much going on in the Application.cfm, why not put that in the cfml template that pulls up the PDF in the first place? I will ask another question, is this application.cfm in the directory of the template in question, or are you relying on the one in the root of the application? Not that it matters, but might explain why you are doing what you are doing with the counting of each request of the PDF. But you really need to work out why it is trying to compile the PDF as a CFML template, that is what the problem is and until you fix that you need to forget about when and how it compiles the CFML template, because and error is not going to compile anything. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Claude Schnéegans [mailto:=?ISO- > 8859-1?Q?Claude_Schn=E9egans 1?Q?ue.com=3E?=] > Sent: Thursday, 23 June 2011 11:04 PM > To: cf-talk > Subject: Re: application.cfm > > > >>In Claude's original question, it doesn't appear he's using CFCONTENT: > > Yes I am. > Here is a summary of the code in application.cfm: > You can see that the requested file is never executed nor intended to. > The only purpose of the .cfm extension is to force the execution of the > application.cfm Here, the code in application.cfm is only used to count the nb > of times each document was requested. > The advantages of the method are 1. simplicity, 2. it is compatible with > previous documents uploaded with true .pdf and .doc extension prior we > implemented this counting scheme. > The only problem which we didn't figure out at the time is that the template > is compiled BEFORE application.cfm is called. > It could have been AFTER as well and CF would still work the same. > In pure logic, there is no use to compile a template before it is certain it will > be executed. > There are other cases templates are compiled for nothing, ie: > application.cfm verifies a user is logged, if not, it toward the loggin script, then the template he called is never executed. > CF could have very well been designed so that templates are compiled only if > executed. > Now I know it is not the case. > > > DATASOURCE="#application.applicationName#"> >SELECT docId, > fileName, > localName >FROM docs >WHERE localName = '#listLast(cgi.script_name, "/")#' > > > fileExists("#application.webRootDir#contentDocuments\#GetDoc.localName > #")> > DATASOURCE="#application.applicationName#"> >UPDATE docs > SET nblu = nblu+1 >WHERE docId = #getDoc.docId# > > > > VALUE='Attachment;filename="#getDoc.fileName#"'> > > FILE="#application.webRootDir#contentDocuments\#GetDoc.localName#"> > > > "This file doesn't exist">SRC="../images/header.png" > WIDTH="790" HEIGHT="135" BORDER="0" ALT=""> > #erreur# > > > > ~~ > ~~~| > Order the Adobe Coldfusion Anthology now! > http://www.amazon.com/Adobe-Coldfusion- > Anthology/dp/1430272155/?tag=houseoffusion > Archive: http://www.houseoffusion.com/groups/cf- > talk/message.cfm/messageid:345570 > Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm > Unsubscribe: http://www.houseoffusion.com/groups/cf- > talk/unsubscribe.cfm ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345572 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>>In Claude's original question, it doesn't appear he's using CFCONTENT: Yes I am. Here is a summary of the code in application.cfm: You can see that the requested file is never executed nor intended to. The only purpose of the .cfm extension is to force the execution of the application.cfm Here, the code in application.cfm is only used to count the nb of times each document was requested. The advantages of the method are 1. simplicity, 2. it is compatible with previous documents uploaded with true .pdf and .doc extension prior we implemented this counting scheme. The only problem which we didn't figure out at the time is that the template is compiled BEFORE application.cfm is called. It could have been AFTER as well and CF would still work the same. In pure logic, there is no use to compile a template before it is certain it will be executed. There are other cases templates are compiled for nothing, ie: application.cfm verifies a user is logged, if not, it SELECT docId, fileName, localName FROM docs WHERE localName = '#listLast(cgi.script_name, "/")#' UPDATE docs SET nblu = nblu+1 WHERE docId = #getDoc.docId# #erreur# ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345570 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
Here's how I would approach this. First, if you are dead set on having the link to the pdf appear as a regular 'pdf' link, create a url rewrite rule (using either mod_rewrite in Apache, an IIS isapi extension for IIS, or another mechanism if you are using some other webserver). The mod_rewrite rule might look something like this (not checked for accuracy): RewriteEngine On RewriteRule ^somefakedownloaddir/(.+?)\.pdf$ processPdfRequest.cfm?file=$1[L] In other words, you can download the pdf by accessing: http://myserver.com/processPdfRequest.cfm?file=/path/to/my.pdf (or a more suitable URL should you be using a framework, etc.) In your 'processPdfRequest.cfm' or somewhere in your request cycle, you can check access rights and file existence. Then, if all is good, serve the file using cfcontent (again, unverified code): HTH Dominic On 22 June 2011 16:12, <> wrote: > > >>The CFML must be compiled in order for Java to execute it > > Sure, but actually I don't want to execute the file, nor compile it. > Yhe file is actually a pdf file under .cfm extension. > This is to force execution of an application.cfm first in which I check if > the user is authorized to open the file. > If yes, the application.cfm returns the document with the correct name and > headers, > if not, it returns an error message. > This way, documents cannot be opened directely. > > I've been using this trick for years, until this morning a user loaded some > document containing by chance characters This causes a compilation error, this is how I figured out that the document > was compiled prior application.cfm was called. > > I'm affraid I'll have to completely redesign my document retreiving system. > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345562 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
yes of course, .htaccess files are otherwise hidden and cannot be viewed or edited. So you would provide a tool within your admin panel to add/remove users to the .htaccess On Thu, Jun 23, 2011 at 5:49 AM, Andrew Scott wrote: > > Would that not be another risk, or do you mean secured login via an admin > panel to edit ths? > > > Regards, > Andrew Scott > http://www.andyscott.id.au/ > > > > > > -Original Message- > > From: Russ Michaels [mailto:r...@michaels.me.uk] > > Sent: Thursday, 23 June 2011 5:15 AM > > To: cf-talk > > Subject: Re: application.cfm > > > > > > It is pretty simple. > > > > use CFFILE to read the .htaccess file > > add a new user > > use CFFILE to write the .htaccess file > > > > User logs in, when he is authenticated, his credentials are available in > the CGI > > scope for you to use via CFML. > > > > As I said, on Apache this is native, on IIS you can use Helicon APE > (which > > probably has an API as well). > > > > > > Russ > > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345561 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
I think he admitted to it a bit later. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Dave Watts [mailto:dwa...@figleaf.com] > Sent: Thursday, 23 June 2011 6:26 PM > To: cf-talk > Subject: Re: application.cfm > > > > Dave, I realise that. In this case he is claiming to use cfcontent, > > any content that is used in this manner should not be compiled into > > the CFML template. > > > > That was my point. > > In Claude's original question, it doesn't appear he's using CFCONTENT: > > "I've noticed that application.cfm is indeed run before the template called in > the url, but the template itself is compiled BEFORE application.cfm is called. I > need to have the ability in application.cfm to run some code and NOT > compile the template." > > If you're using CFCONTENT to fetch a file, that file isn't the template called in > the URL. > > Dave Watts, CTO, Fig Leaf Software > http://www.figleaf.com/ > http://training.figleaf.com/ > > Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA > Schedule, and provides the highest caliber vendor-authorized instruction at > our training centers, online, or onsite. > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345560 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
> Dave, I realise that. In this case he is claiming to use cfcontent, any > content that is used in this manner should not be compiled into the CFML > template. > > That was my point. In Claude's original question, it doesn't appear he's using CFCONTENT: "I've noticed that application.cfm is indeed run before the template called in the url, but the template itself is compiled BEFORE application.cfm is called. I need to have the ability in application.cfm to run some code and NOT compile the template." If you're using CFCONTENT to fetch a file, that file isn't the template called in the URL. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345559 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
Dave, I realise that. In this case he is claiming to use cfcontent, any content that is used in this manner should not be compiled into the CFML template. That was my point. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Dave Watts [mailto:dwa...@figleaf.com] > Sent: Thursday, 23 June 2011 4:56 PM > To: cf-talk > Subject: Re: application.cfm > > > > CF should not be compiling anything that is not CFML, if it is this > > actually happening then it sounds like a bug in CF. > > If you give a file a .cfm extension and invoke that file in an HTTP request on a > server configured to run CF, for all intents and purposes that file is CFML, > whether it contains any CFML tags or functions or not. And CF will compile it, > and this is not a bug, but the intended behavior. > > Dave Watts, CTO, Fig Leaf Software > http://www.figleaf.com/ > http://training.figleaf.com/ > > Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA > Schedule, and provides the highest caliber vendor-authorized instruction at > our training centers, online, or onsite. > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345557 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
> CF should not be compiling anything that is not CFML, if it is this actually > happening then it sounds like a bug in CF. If you give a file a .cfm extension and invoke that file in an HTTP request on a server configured to run CF, for all intents and purposes that file is CFML, whether it contains any CFML tags or functions or not. And CF will compile it, and this is not a bug, but the intended behavior. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345556 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
Would that not be another risk, or do you mean secured login via an admin panel to edit ths? Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Russ Michaels [mailto:r...@michaels.me.uk] > Sent: Thursday, 23 June 2011 5:15 AM > To: cf-talk > Subject: Re: application.cfm > > > It is pretty simple. > > use CFFILE to read the .htaccess file > add a new user > use CFFILE to write the .htaccess file > > User logs in, when he is authenticated, his credentials are available in the CGI > scope for you to use via CFML. > > As I said, on Apache this is native, on IIS you can use Helicon APE (which > probably has an API as well). > > > Russ > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:34 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
.htacces file dude you were told that. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Claude Schnéegans [mailto:=?ISO- > 8859-1?Q?Claude_Schn=E9egans 1?Q?ue.com=3E?=] > Sent: Thursday, 23 June 2011 5:09 AM > To: cf-talk > Subject: Re: application.cfm > > > >>the admin of your CMS > > Of course, this is the way it works, but you were talking about "password > protect certain folders". > I don't see how this can be done by CF code when files other than .cfm or .cfc > are requested by HTTP and the CF server is not even invoked. > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345554 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
CF should not be compiling anything that is not CFML, if it is this actually happening then it sounds like a bug in CF. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Claude Schnéegans [mailto:=?ISO- > 8859-1?Q?Claude_Schn=E9egans 1?Q?ue.com=3E?=] > Sent: Thursday, 23 June 2011 1:41 AM > To: cf-talk > Subject: Re: application.cfm > > > >>But I am at a loss to explain how a PDF is going to throw a CF Exception > error, when using cfcontent to deliver the file it should not be trying to > compile that content. > > The error is not thrown using cfcontent, but simply when CF compiles the file > when the HTTP request is received, before even executing application.cfm In > my mind, application.cfm was called first, then the template compiled and > run. > Apparently, both application.cfm and the template are compiled first, then > executed. > This means that if application.cfm does not let the template to be executed, > it is compiled for nothing. > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345552 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
It is pretty simple. use CFFILE to read the .htaccess file add a new user use CFFILE to write the .htaccess file User logs in, when he is authenticated, his credentials are available in the CGI scope for you to use via CFML. As I said, on Apache this is native, on IIS you can use Helicon APE (which probably has an API as well). Russ On Wed, Jun 22, 2011 at 8:08 PM, <> wrote: > > >>the admin of your CMS > > Of course, this is the way it works, but you were talking about "password > protect certain folders". > I don't see how this can be done by CF code when files other than .cfm or > .cfc are requested by HTTP and the CF server is not even invoked. > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345547 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>>the admin of your CMS Of course, this is the way it works, but you were talking about "password protect certain folders". I don't see how this can be done by CF code when files other than .cfm or .cfc are requested by HTTP and the CF server is not even invoked. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345545 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
the admin of your CMS On Wed, Jun 22, 2011 at 7:48 PM, <> wrote: > > >>The admin can still edit users, even 1000's > > Which admin? Window's or CF? > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345542 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>>I agree to both Steven and Azadi's solution. Of course I know this solution. I thought I had a simpler one. >>Someone can rename a CFM file to a PDF file and upload it. Now that CFM code can be executed on the server. No way. Even if the pseudo pdf file actually contains CFML code, it cannot be executed. At best, the file will be sent as a pdf file by CFCONTENT then application.cfm CFABORTs Furthermore, only the customer, who has paid for his system, is able to upload files. I doubt he ever attemps to sabotage his own system. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345541 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>>The admin can still edit users, even 1000's Which admin? Window's or CF? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345540 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
Hi Claude, I agree to both Steven and Azadi's solution. Sorry Claude, but yes, you will have to rewrite your system. The "trick" you are using is a security risk. Someone can rename a CFM file to a PDF file and upload it. Now that CFM code can be executed on the server. It shouldn't be that hard to do, since you are already serving up the PDF via cfcontent anyway. Just change where you store your files. - Rex On 6/22/2011 8:47 AM, Azadi Saryev wrote: > store your pdf files outside of web root so they are not directly > accessible. > serve them via an intermediary .cfm page, passing it the name of the pdf > file, which checks user's access rights to requested pdf and serves the > file or shows an error. > > Azadi > > On 22/06/2011 22:33 , =?ISO-8859-1?Q?Claude_Schn=E9egans wrote: >> Hi, >> >> I've noticed that application.cfm is indeed run before the template called >> in the url, but the template itself is compiled BEFORE application.cfm is >> called. >> I need to have the ability in application.cfm to run some code and NOT >> compile the template. >> >> Is it possible ? >> CF 9 >> >> > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345536 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
The admin can still edit users, even 1000's On Wed, Jun 22, 2011 at 4:43 PM, <> wrote: > > >>A better way to achieve what you want is to password protect certain > folders > on your site > > I never use authentication on the server. > Only through CF, since the administrators of my CMS can add/edit their own > users, sometime 1000s of members. > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345535 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
store your pdf files outside of web root so they are not directly accessible. serve them via an intermediary .cfm page, passing it the name of the pdf file, which checks user's access rights to requested pdf and serves the file or shows an error. Azadi On 22/06/2011 22:33 , =?ISO-8859-1?Q?Claude_Schn=E9egans wrote: > Hi, > > I've noticed that application.cfm is indeed run before the template called in > the url, but the template itself is compiled BEFORE application.cfm is called. > I need to have the ability in application.cfm to run some code and NOT > compile the template. > > Is it possible ? > CF 9 > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345534 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
This is because you are actually saving a pdf file as a .cfm. Maybe you should save it under a different extension, then have a page that serves it up using cfcontent. -Original Message- From: =?ISO-8859-1?Q?Claude_Schn=E9egans [mailto:schneegans@interneti=71?=.=?ISO-8859-1?Q?ue.com=3E?=] Sent: Wednesday, June 22, 2011 11:41 AM To: cf-talk Subject: Re: application.cfm >>But I am at a loss to explain how a PDF is going to throw a CF Exception error, when using cfcontent to deliver the file it should not be trying to compile that content. The error is not thrown using cfcontent, but simply when CF compiles the file when the HTTP request is received, before even executing application.cfm In my mind, application.cfm was called first, then the template compiled and run. Apparently, both application.cfm and the template are compiled first, then executed. This means that if application.cfm does not let the template to be executed, it is compiled for nothing. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345533 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>>A better way to achieve what you want is to password protect certain folders on your site I never use authentication on the server. Only through CF, since the administrators of my CMS can add/edit their own users, sometime 1000s of members. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345532 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>>But I am at a loss to explain how a PDF is going to throw a CF Exception error, when using cfcontent to deliver the file it should not be trying to compile that content. The error is not thrown using cfcontent, but simply when CF compiles the file when the HTTP request is received, before even executing application.cfm In my mind, application.cfm was called first, then the template compiled and run. Apparently, both application.cfm and the template are compiled first, then executed. This means that if application.cfm does not let the template to be executed, it is compiled for nothing. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345531 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
Actually I disagree with what you are saying here, first I would not be putting the authentication in the Application.cfm and instead look at securing it some other way. But that is not your issue. The issue is that you are trying to run a template that will throw an error, nothing that I can think of from the top of my head will ever get around that. Your best option would be to use the template in question with url parameters with the name of the file. Then in that template check the authentication and then pass the name of the PDF and use cfcontent to actually load a PDF back to the browser. Your method is just asking for more headaches like this. But I am at a loss to explain how a PDF is going to throw a CF Exception error, when using cfcontent to deliver the file it should not be trying to compile that content. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Claude Schnéegans [mailto:=?ISO- > 8859-1?Q?Claude_Schn=E9egans 1?Q?ue.com=3E?=] > Sent: Thursday, 23 June 2011 1:12 AM > To: cf-talk > Subject: Re: application.cfm > > > >>The CFML must be compiled in order for Java to execute it > > Sure, but actually I don't want to execute the file, nor compile it. > Yhe file is actually a pdf file under .cfm extension. > This is to force execution of an application.cfm first in which I check if the > user is authorized to open the file. > If yes, the application.cfm returns the document with the correct name and > headers, if not, it returns an error message. > This way, documents cannot be opened directely. > > I've been using this trick for years, until this morning a user loaded some > document containing by chance characters This causes a compilation error, this is how I figured out that the document > was compiled prior application.cfm was called. > > I'm affraid I'll have to completely redesign my document retreiving system. > > ~~ > ~~~| > Order the Adobe Coldfusion Anthology now! > http://www.amazon.com/Adobe-Coldfusion- > Anthology/dp/1430272155/?tag=houseoffusion > Archive: http://www.houseoffusion.com/groups/cf- > talk/message.cfm/messageid:345525 > Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm > Unsubscribe: http://www.houseoffusion.com/groups/cf- > talk/unsubscribe.cfm ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345529 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
A better way to achieve what you want is to password protect certain folders on your site so that the files cannot be access until a user has logged in. Using CF to do this only works to secure cfm files, so if you want to secure PDF's and the likes then simply use .htaccess files instead. This is native to Apache and can be done on IIS using Helicon APE. Once the user is authenticated via the .htaccess you can capture the username to CF for further granular control. Using only CF and not .htaccess the usual method to secure files is to store them outside the webroot and use CFCONTENT to deliver them to authenticated users. This however does have issues as it can easily result it hung native java requests if the file fails to download for any reason or the user closes his browser, which means CF needs restarting in order to free up that hung request. Once you reach your max number of concurrent requests then CF will stop processing. HTH Russ On Wed, Jun 22, 2011 at 4:10 PM, Andrew Scott wrote: > > Do you mind me asking what need would require this? I am struggling to even > think of one. > > > Regards, > Andrew Scott > http://www.andyscott.id.au/ > > > > > > -Original Message- > > From: Claude Schnéegans [mailto:=?ISO- > > 8859-1?Q?Claude_Schn=E9egans > 1?Q?ue.com=3E?=] > > Sent: Thursday, 23 June 2011 12:33 AM > > To: cf-talk > > Subject: application.cfm > > > > > > Hi, > > > > I've noticed that application.cfm is indeed run before the template > called > in > > the url, but the template itself is compiled BEFORE application.cfm is > called. > > I need to have the ability in application.cfm to run some code and NOT > > compile the template. > > > > Is it possible ? > > CF 9 > > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345528 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>>I can't think of a logical case for this, and would love to hear it if you have one. Please see my othe reply. When an administrator uploads some document ie: myDoc.pdf, it is stored as myDoc.pdf.cfm When a user tries to open directly myDoc.pdf.cfm in the url, the document is protected by some code in application.cfm I never want to have the document compiled. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345527 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: application.cfm
Do you mind me asking what need would require this? I am struggling to even think of one. Regards, Andrew Scott http://www.andyscott.id.au/ > -Original Message- > From: Claude Schnéegans [mailto:=?ISO- > 8859-1?Q?Claude_Schn=E9egans 1?Q?ue.com=3E?=] > Sent: Thursday, 23 June 2011 12:33 AM > To: cf-talk > Subject: application.cfm > > > Hi, > > I've noticed that application.cfm is indeed run before the template called in > the url, but the template itself is compiled BEFORE application.cfm is called. > I need to have the ability in application.cfm to run some code and NOT > compile the template. > > Is it possible ? > CF 9 > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345526 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
>>The CFML must be compiled in order for Java to execute it Sure, but actually I don't want to execute the file, nor compile it. Yhe file is actually a pdf file under .cfm extension. This is to force execution of an application.cfm first in which I check if the user is authorized to open the file. If yes, the application.cfm returns the document with the correct name and headers, if not, it returns an error message. This way, documents cannot be opened directely. I've been using this trick for years, until this morning a user loaded some document containing by chance characters http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345525 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
First, I will say that this is a strange request, and chances are, you're doing something wrong. Compile errors mean that there was more than an error, it's that the template has serious problems that the CFML compiler couldn't parse. The fact that you still want one page to execute and another to not compile is weird, strange, odd. I can't think of a logical case for this, and would love to hear it if you have one. That said, you should be able to do this with an Application.cfc file instead of Application.cfm. Make an onRequest method, which will compile and run that function, then from there you cfinclude the requested template, which should be compiled only when execution reaches that include. I always use Ray's Application.cfc reference, for reference: http://www.coldfusionjedi.com/downloads/application.cfc.txt nathan strutz [www.dopefly.com] [hi.im/nathanstrutz] [about.me/nathanstrutz] On Wed, Jun 22, 2011 at 7:33 AM, <> wrote: > > Hi, > > I've noticed that application.cfm is indeed run before the template called > in the url, but the template itself is compiled BEFORE application.cfm is > called. > I need to have the ability in application.cfm to run some code and NOT > compile the template. > > Is it possible ? > CF 9 > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345524 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm
The CFML must be compiled in order for Java to execute it You can however stop the class file being generated so that it is compiled to memory only. In the CFADMIN under caching settings -> *Save class files* Russ On Wed, Jun 22, 2011 at 3:33 PM, <> wrote: > > Hi, > > I've noticed that application.cfm is indeed run before the template called > in the url, but the template itself is compiled BEFORE application.cfm is > called. > I need to have the ability in application.cfm to run some code and NOT > compile the template. > > Is it possible ? > CF 9 > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345523 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm question
The error you have there is a *compile time* *syntax* error, the code will be compiled before the request is 'run' which is why you see the error. If you change the code in index.cfm to , the code will compile fine and will then abort in your app.cfm as the error that would be thrown by the undefined var would be a *runtime* error. HTH Dominic On 31 December 2010 10:55, Richard Steele wrote: > > I'm testing some error checking stuff and don't understand why the > application.cfm doesn't abort before an error is found in a file. > > Here's the application.cfm > > > Here's the index.cfm > > > When the index.cfm is run, it shows the error information (Unknown tag: > cftest). I would think that application.cfm would fire first and not even > get to index.cfm. > > What am I'm missing here? Thanks in advance. > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340335 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: application.cfm question
On 31/12/2010 9:55 PM, Richard Steele wrote: > > I'm testing some error checking stuff and don't understand why the > application.cfm doesn't abort before an error is found in a file. > > Here's the application.cfm > > > Here's the index.cfm > > > When the index.cfm is run, it shows the error information (Unknown tag: > cftest). I would think that application.cfm would fire first and not even get > to index.cfm. It is failing at compile time as that is a bad tag, it never gets as far as actually running the code because ity cannot compile it. Try putting a bad(unknown) variable name instead of a bad tag so the code compiles and then as it runs it will hit the cfabort and stop before it gets to the bad variable. If you are trying to error check at runtime for bad tags then you can't because it never gets that far. Hope that answer helps as I have to dash, some midnight fireworks to go to :-) Happy New Year everyone. -- Yours, Kym Kovan mbcomms.net.au ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340334 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Application.cfm to Application.cfc migration (Problems with Functions in Application.cfc)
I would take your UDF's, put them into their own utility CFC, and load the CFC into the APPLICATION scope during onApplicationStart(). If you ever need to reload the CFC, you could always rerun your onApplicationStart() method. Steve "Cutter" Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer Co-Author of "Learning Ext JS" http://www.packtpub.com/learning-ext-js/book _ http://blog.cutterscrossing.com On 8/26/2009 5:24 AM, SANJEEV SINGLA wrote: > Hi All, > > I am migrating from application.cfm to applicaton.cfc and have following > issues. > > > In my application.cfm I have some statements like : > > Application.ini.debug.ReloadObjects)> > > The loadAppCFC method is defined within the Application.cfm itself. There are > few other functions which are defined in Application.cfm and are used in > Application.cfm (as above example.) > > Noe the comUDF is again a cfc which has many user defined functions which are > required on every page. > > The other methods defined directly in Application.cfm are also required to be > loaded for each page. While migrating to application.cfc I took all the > functions from Application.cfm and put it in one file. Then I inluded the > following event. > > > > > > > > But Still I get error as "Variable COMUDF is undefined.". Not sure what's > happening. Please help. > > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325719 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: application.cfm question
John CF will just process the application.cfm of the original file not from any directory where the included file comes from (if different from the calling file) e.g. /dir1/ /dir1/dir2 - both dir1 and dir2 have their own application.cfm If you have a file in dir1 and this includes a file in dir2, even though dir2 has an application.cfm, the application.cfm will be called from the directory of the original calling file e.g. dir1 Hope that helps and makes sense On 11/9/06, John Cox <[EMAIL PROTECTED]> wrote: > Thanks Mike and Rich! > > On 11/9/06, Dawson, Michael <[EMAIL PROTECTED]> wrote: > > > > Application.cfm is called once per request. CFINCLUDE is not considered > > to be a request. > > > > However, the easiest way to test it is to add a CFMAIL or CFLOG tag to > > the application.cfm file and then try it on an included file. > > > > M!ke > > > ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259759 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: application.cfm question
Thanks Mike and Rich! On 11/9/06, Dawson, Michael <[EMAIL PROTECTED]> wrote: > > Application.cfm is called once per request. CFINCLUDE is not considered > to be a request. > > However, the easiest way to test it is to add a CFMAIL or CFLOG tag to > the application.cfm file and then try it on an included file. > > M!ke ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259758 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: application.cfm question
Application.cfm is called once per request. CFINCLUDE is not considered to be a request. However, the easiest way to test it is to add a CFMAIL or CFLOG tag to the application.cfm file and then try it on an included file. M!ke -Original Message- From: John Cox [mailto:[EMAIL PROTECTED] Sent: Thursday, November 09, 2006 7:31 AM To: CF-Talk Subject: Re: application.cfm question On 11/9/06, RichL <[EMAIL PROTECTED]> wrote: > > Coldfusion will look for an application.cfm at the current folder > level and carry on up the directory tree until it finds one. > > The first that it finds will override any further up the tree Thanks, I understand that part. What I don't understand is when you include a file from a different directory. Does it look at the included file's directory or just the directory that is calling the file. IE, is it possible that several application.cfms are loaded, or does ColdFusion only load the the application.cfm from the processed file's directory? ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259756 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4