[Looking for Charlie's main web site?]

Tweak your CF Debugging Output for better info about queries

Note: This blog post is from 2008. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
Hey folks, if you've ever wished that the CF debugging output had some improvements, did you know you don't need to wait for Adobe to do it?

Ray Camden has written an entry which has an available download of an improved debugging template, which you can easily drop into your CF setup and immediately get the improved info (focused on better tracking query time info). This improvement doesn't require any change in your browser (like the ColdFire alternative, which I'll mention at the end below).

The additional debugging benefits

Ray implemented some ideas I posed as improvements for Adobe to consider adding, such as to offer a total of all query time spent (by default we see the time in each query, but not totaled). I also thought it would be nice to see highlighting of those queries that exceed a given amount of time, just like we get with included files and CFC methods. I mentioned a couple other things as well. Ray went ahead and made the changes for some of them.

How he did it

How'd he do that? Well, many may not realize that the debugging output we see is in fact editable because it's enabled by way of a CFML template (the default one's called classic.cfm). It's just CFML.

I've known for years that the file was editable, but I just didn't think to go ahead and edit it, or to share it with others. My focus was to get Adobe to consider it for an upcoming release. But, sure, if we can have it now (until they do), I suppose that's better than nothing, so thanks, Ray. :-)

How to get it

You can read more about the update, and download it, at Ray's entry.

(BTW, some folks might miss the download link on Ray's entry. It's at the bottom of his entry, just before the comments, on the line listing the entry's time/date and number of comments. Here's the URL for it, also.)

How to implement it

You can drop Ray's updated version into the place where these debugging templates live, which is under the [cf root]\WEB-INF\debug\). The improved info will be immediately available in any browser. Again, it's just a tweak of the normal debug output.

In a Server deployment on CF8 in Windows, the location to drop it would typically be C:\ColdFusion8\wwwroot\WEB-INF\debug\, or something like C:\JRun4\servers\[instancename]\cfusion-ear\cfusion-war\WEB-INF\debug\ if you're running on the Multiserver/multi-instance deployment mode.

Be sure to save a copy of the old one first under a new name, in case you want to revert back.

You could also give this new file a new name, and then just select it in the CF Admin Debug Output Settings page (as it's named in CF8). As soon as any cfm file is put in that directory above, it will be shown the drop-down of "Select Debugging Output Format".

Some other info

Note that the version he's offered at first there is known to work only for CF8 for now. Update: I just tested it in CF7 and it worked as well.

There's been interest expressed in creating an open source project on RIAForge, and that should offer versions for different versions (and perhaps different CFML engines). I'll share more news if that comes to pass.

And Ray would want to also point out ColdFire, a Riaforge project that uses yet another debug template in conjunction with a ColdFire Firefox add-in (that works in conjunction with the Firebug add-in). For more, see http://coldfire.riaforge.org/.

While ColdFire offers some neat features, I still myself like the idea of tweaking the classic template instead, as it's cross-browser and requires no changes to the browser. For a lot of developers, the easier it is to provide a benefit, the more likely they are to implement it. I hope to see this capability evolve still more over time.

New (free) tool to assist in configuring FusionReactor datasource monitoring

Note: This blog post is from 2008. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
Folks using FusionReactor won't want to miss this news. There's a new tool available to help automate the process of configuring CF Admin datasources to be monitored (wrapped) by FusionReactor. What used to be a multi-step manual process is now just a single button.

Check out the JDBC Wrapper Tool. For now it's technically a "community contributed" tool (not in labs, and not from Intergral as a formal product). But it was written by an Intergral employee, Dave Stockton, and the company is very interested in your feedback about it. (Intergral is the company behind FusionReactor and FusionDebug.)

Check out the page for the download, docs, screenshots, a change log, tested databases and CFML server configirations, and more. (And note that it's not just for CF, but is intended to work with others. Railo support is listed coming soon **that's an update from the original post, where I said Railo support was there**.) If you can try it on other DBMSs and CFML servers, they'd welcome that input.

For those who have needed to monitor/wrap datasources, especially many, or on many servers, this is a real gem. Whether you are or not using a supported server, it's worth a few minutes of your time to check things out. I've used it, and it worked great.

For those not sure what this datasource monitoring/wrapping is all about, check out an entry I wrote earlier this year, What is the FusionReactor datasource monitoring feature? Why would I use it? Powerful stuff!. Both that and the docs I link to will give you more info. The datasource monitoring really is really a great tool for troubleshooting and trend analysis.

My coming busy week of speaking engagements at Max

Note: This blog post is from 2008. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
Some folks like to know who's speaking when at conferences, so here's my schedule. It's a busy one, with 2 official Max talks, 2 Unconference talks, 2 Unconference panels, among other things. Here are the times and details.

Two Official Max talks:

Two Unconference talks:

Two Unconference Panels

I also may be giving a talk to an internal Universal Mind mini-conference going on the Saturday before the conference, held for all UM consultants (employees and contractors, like myself. I occasionally do consulting for them.)

So busy week, and that's before attending any sessions, BOFs, and so on! See you there. :-)

CF911: CF 8 Server Monitor reports "ColdFusion Server is unavailable" (solution)

Note: This blog post is from 2008. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
Here's another entry in my CF911 series. If you try to open the CF8 server monitor and get the error "ColdFusion Server is unavailable", the problem may be in your web server configuration. In this entry, I help you confirm if you're getting the problem I refer to here, and of course I show the solution (3 actually), with a caveat.

Here's a screenshot of what you may see:

Note that this is not an error related to logging in. You do need to fill in a username to log into the Server Monitor, even if CF is set to only ask for a password when logging into the Admin. Just use "admin". This and other facets about the CF8 Server Monitor are covered in a 4-part series of articles I did in the Adobe Dev Center, starting here.

Confirming this is the cause of your Monitor challenge

From my observation, this error is related to a problem with the Flex client being able to talk to the server using a URL it needs to use, and the problem is web server related.

You can confirm if what I'm about to describe is your issue by trying to access the URL that the server monitor tries to use to access the Flex Gateway for CF, such as:


Actually, you should use whatever domain name/port you're using to access your CF Admin, which is then used when you ask it to open the CF8 monitor, which may be a URL like this:


Anyway, if that test attempt to open the /flex2gateway/ url comes back with a "file not found" (or 404) error, as opposed to a blank page, then you likely have the problem I'm describing, whereby your web server is mistakenly looking to verify that a file exists for the path you're specifying. You have 2 solutions.

First, let me note that this flex2gateway URL is not a file, nor a directory. It's a value intercepted by a servlet filter defined within CF. You need to tell your web server not to check for any existing file (it's trying to use one of the "default documents" that are used when only a path to the web server is provided.) Before launching into how to fix your web server, you may want to consider one other possibly simpler alternative.

Changing to use the Internal Web Server

Some will note that I've used no port above in the URL. That's why I point out for you to try whatever URL is used to access your Admin. In the case above (and the people who have reported this problem so far that I've seen, they've been trying to access the CF admin using their external web server, IIS.

If instead you were to use the CF internal web server to access the CF Admin, you'd have a port in the URL, like this:


(or it could be 8300, or 8301: whatever is the port for accessing the built-in web server for CF, if you chose to implement that when CF was installed, and you are accessing the Admin that way.)

Well, I'd propose that if you DO use the internal web server, you probably won't get this error at all. The problem seems related to using IIS to access the Admin (and the CF 8 Server Monitor).

That said, I'll suggest that one quick solution folks can try is to see if indeed they can access their CF Admin (and monitor) using the internal web server. (If you can't or won't use it, I have the solution for getting it to work with IIS, in a moment.)

You just need to know what port to use to access the internal web server, if it's enabled.

First, you may find that if (on Windows) you use Start>Programs>Adobe>ColdFusion 8>Administrator that it will open using the built-in web server. If it does, see if using that gets you around this whole problem.

If that opens it with external web server (doesn't use a port like those above), or if you aren't on Windows and have no Start menu, you can also get the web server port (and indeed enabled it, if disabled) by way of the jrun.xml file. Rather than detail it here, I'll point you to a couple of resources:

Configuring the Macromedia ColdFusion MX built-in web server is an old technote, but the info still applies. Where it talks about disabling the internal web server, you'd want to reverse that, of course. There can be more subtleties and challenges to running the CF admin on the internal web server, if you don't configure it that way at the start, such as where are the /CFIDE files? Are they in the [cf]/wwwroot? or in your web server doc root, like inetpub/wwwroot? The built-in web server will look for them in the [cf]/wwwroot, so you may need to copy the CFIDE into this directory, or add a mapping to the built-in web server to point to the path as being located externally.

Making the change in IIS

Or you could just fix IIS to let you access the server monitor via IIS. The problem may be due to a setting in IIS (verify that files exist) that you may have caused to be set. (I don't know if it's set by default when CF is configured to integrate with a site, but I wouldn't think it was, so maybe this affects those who add new sites or configure things manually.)

And since this problem may affect other Flash/Flex apps trying to talk to CF, it may be worth doing for all such users. But this does come with a caveat to be aware of, if you might be using NTLM security to control access to files requested via IIS. More in a moment.

I offer the solution for IIS 6 and 7. I don't know if the same problem can affect Apache. If so, and anyone can offer the solution for there, please do comment.

Making the change in IIS 6

For IIS 6, launch the IIS Manager and select the web site which has the CF Admin you're trying to use. (It may be that you've also configured IIS so that ALL web sites are configured for CF, in which case this setting would be not at the site-level but at the root server-level, so you'd select the server name instead in the left IIS pane.)

From there, right-click and choose properties, and then select the "home directory" tab, then in the "application settings" area click the "configuration" button, and in the "wildcard mappings" section you should see something like "C:\ColdFusion8\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll" (which will be different, of course, for the JRun4-based Multiserver deployment).

This value is implemented here during the install of CF if you tell it to integrate with IIS, or by your running the CF Web Server Configuration tool after the fact.

Select it, and choose Edit, and if the "Verify that file exists" option is checked, un-check it. This setting can be confusing: you may think it means "verify that the named executable exists", but it doesn't. It refers to whether files requested and passed through this handler should be checked to confirm if THEY exist. Here's a depiction of the setting and how to get there.

Now try the URL above, and it should no longer give a 404. Then try again to login into the Admin. (Actually, you may find that you can just click the "cancel" button and it will login, even if the values for username and password are blank. I find this helpful when the CF server is temporarily unresponsive too, and the Monitor login screen pops up.) Hopefully the server monitor now works for you.

Note that this was NOT about changing the handler mapping for .cfm files, which also offers an option to control the "verify that file exists".

A caveat about access via IIS to NTLM secured files, and another alternative

Thanks to Mike Gillespie for the following notice and clarification. If you use NTLM security (windows integrated authentication in IIS) to secure files accessed via IIS, then you DO NOT WANT TO make the above change for your IIS site. I share below what he offered to me.

But I'd point out again that even with that issue, you could still use the built-in web server is a solution. Or, sticking with IIS, you could also create a new IIS site just for accessing the CF admin and monitor, and make the change above for that site only.

Anyway, if you do use NTLM security to control access to sites requested via IIS, consider the following:

The check that file exists option is required if you want to use NTLM perms to secure .cfm files. http://www.adobe.com/go/tn_18516 (Steps 1-4)

If you have a secure folder on your webserver put a .htm file and a .cfm file in it. Do not give your ID access to that folder. In IIS turn on clear text and NTLM auth.

With the "check that File Exists" option unchecked, try this test.

Try to access the .htm file in the browser - access denied

Try to access the .cfm file in the folder, - access GRANTED - so much for NTLM perms

Now check the box and try again (you will need to recycle cf and IIS)

Try to access the .htm file in the browser - access denied

Try to access the .cfm file in the folder, - access denied as it should be - but flash forms and server monitor are dead.

So "fixing" the Server Monitor problem on an authenticated server just broke the security of the server for the sake of monitoring... [frown>]

In a nutshell.

If you implement this so that CF pages can be authenticated against Windows Security http://www.adobe.com/go/tn_18516, then Flash forms break (and the server monitor too). So to get flash forms (and the server monitor) working, you have to implement this, which fixes flash forms (though every user gets their own personal file on disk on the server that has to be cleaned up) but it does not fix the server monitor.

It is the "check that file exists" selection that breaks the Server Monitor (and flash forms).

On a cf webserver that grants anonymous access there is no reason to check the "check that file exists" box. However, on a server that does authenticate users for NTLM file access, that box should be checked.

This section above was added after the entry was first posted.

The change for IIS 7. None needed?

For IIS 7, it's a little different. I actually run IIS 7 (Vista) and am not sure how/where the wildcard mapping equivalent got created (I may have fudged it manually), but it's now listed as a "Handler Mapping" (in the properties for a web site). In my case, it's labeled "AboMapperCustom-32635", but just look at those listed as handling "*" meaning all requests. It's listed with a value of IsapiModule in the Handler column. (If you're looking at a specific site, and the "Entry type" column says "Inherited", then there is another mapping at the server level, so select your server name in the left IIS panel, and repeat.)

Even so, I see no option to control "verify that file exists", so maybe this problem can't happen in IIS 7. I will say, FWIW, that there is indeed a an equivalent to that "verify that file exists" option, at least for specific extension handler mappings. Look a the one for .cfm, for instance. Double-click it to see its properties, and note a new button called "request restrictions". It has an option, "Invoke handler only if request is mapped to", and an option of "file". Again, though, this does not affect requests to non-cfm requests like that for the /flex2gateway/ URL.

About other Flex/Flash apps

As I said, it may be that the info above will help other Flex apps having trouble talking to CF (the CF8 monitor is a Flex app), but I'll note that this problem doesn't affect all Flex apps: only those that connect to CF via IIS.

For instance, on this same server where this problem occurred, there was never any problem using FusionReactor (which is also a Flex app). It was working fine the whole time. But then its default behavior is also to use its own Built-in web server, so requests weren't going through IIS. If I did try to use IIS to access FusionReactor, then it too failed (with a file not found), and the fix above solved that.

CF911: CF doesn't respond for extended lengths of time

Note: This blog post is from 2008. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
This is the first of a series of blog entries I'll do under the heading of CF911, to share info I offer to people when I help people solve CF problems either on mailing lists or by my support consulting.

One problem: CF not responding

Someone asked for help on one of the Adobe forums, with a problem about users reporting that the server was not responding for extended periods.

After checking the logs (CF, Windows event, and IIS logs) and not "seeing anything to indicate errors", he wondered if somehow "you can set site availability windows".

I replied to him that, no, there are no features to set "windows of availability" for CF. So either CF was up and responding, or it wasn't. Even if it was, it may also be that his problem was with IIS. There are a few things that he could check....

[....Continue Reading....]

Connect recordings listed with breezecentral.com domain will break: here's the solution

Note: This blog post is from 2008. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
If you're a speaker, user group manager, or blogger who offers URLs for previously recorded Breeze/Connect presentations, you may find that some now break because they point to a domain that Adobe no longer supports, breezecentral.com. Someone noted that an old entry that had been entered previously in my UGTV repository now broke. I looked into it, found the answer, and am sharing it here for others.

It's understandable, since Breeze was renamed to Connect a long time ago, but the bummer is that so many folks have for so long pointed to such recordings, and now they will all break. I've changed all the UGTV entries.

Here is a table of the old URLS and new ones that I've found to work for each. It's not always quite as obvious as it may seem:

These need adobe.acrobat.com
adobechats.adobe.breezecentral.com adobechats.adobe.acrobat.com
adobechats.breezecentral.com adobechats.adobe.acrobat.com
mmchats.breezecentral.com mmchats.adobe.acrobat.com
mmusergroup.breezecentral.com mmusergroup.adobe.acrobat.com
seminars.breezecentral.com seminars.adobe.acrobat.com
These just need acrobat.com
experts.breezecentral.com experts.acrobat.com
stevenerat.breezecentral.com stevenerat.acrobat.com
mmse.breezecentral.com mmse.acrobat.com

Of course, I'm sure there are many other URLS out there using breezecentral.com. I'm only listing those that were in my UGTV database, that I tested and changed.

So for example, Doug Smith had noted that this entry from a 2006 talk by Sean Corfield, on "Objects and Persistence" failed (with domain not found):


The correct new URL is:


So I've taken care of the UGTV entries. If you have your own listing of such URLs, I hope you'll take note of all this and make the changes for yourself and your readers.

Better understanding the IIS HTTPERR logs

Note: This blog post is from 2008. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
If you run IIS, are you familiar with its HTTPERR logs? If not, you may be missing out on some useful diagnostic information. Sadly, many (sometimes most) of the entries in the logs are innocuous (you don't need to worry about them), but sometimes they're useful. And if have noticed the logs, perhaps you'd like to know more about them.

There's a useful MS document, Error logging in HTTP API, with more about the HTTPERR logs, including their location, format, and info on the kinds of errors reported within them. Hope that's helpful to my readers.

Here's another (more brief) introduction to the files: in the technical reference section of the IIS 6 docs.

Kids these days, rowdy like it's 19... um, 399AD

Note: This blog post is from 2008. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
A teacher writes that he moved to a new city because he heard the students there were much less rowdy than in his former school, where they would "burst in rudely [into a random classrooom] and disrupt the discipline which the teacher had established".

Of course, we take it as a given that this could happen in many places today, but what's interesting is this isn't an account from today, or yesteryear. Not 100 years ago, nor even 1,000 years ago, but the late 4th century AD!

I was persuaded to go to Rome and teach there [because]... I had been informed that the students there studied more quietly and were better kept under the control of stern discipline, so that they did not capriciously and impudently rush into the classroom of a teacher not their own--indeed, they were not admitted at all without the permission of the teacher. At Carthage, on the contrary, there was a shameful and intemperate license among the students. They burst in rudely and, with furious gestures, would disrupt the discipline which the teacher had established for the good of his pupils.

This is from Augustine's Confessions, an autobiographical work (more than that, really) regarded as one of the earliest in western civilization. Of course it's an English translation of the original Latin, but boy, it sure sounds like things haven't changed.

So next time you want to lament "kids these days", just know that it's not really all that much worse than in times past. Sure, there have been periods where calm and discipline may have reigned, but sadly it's human nature to degrade to chaos. The gist of the work is about the guiding hand that causes this pendulum to swing to and fro.

Even if you don't agree with his premise, it's still an often fascinating glimpse into redemption from a debaucherous life 1600 years ago, from Augustine's pulling pranks as a child to gain acceptance, to falling in with the wrong crowd as a teen and stealing things just for the thrill, to dropping out of school, later shacking up with a girlfriend unmarried for 11 years, and so on. He turns out well in the end, to the extreme, so there's hope. As one who did at least a couple of those things myself, I can surely relate.

But my main point is that we tend to look on the past with rose-colored glasses, as if they were always simpler, more innocent times, so unlike ours, and that today is a time of unprecedented declining moral values. "Sure", we figure, "those were tough times, with wars, pestilence, disease back then", but we assume we've moved beyond with modern culture, intelligence, reason, etc.

I just think it's pretty eye-opening to get a chance to peer into a time capsule like this from so long ago, to see a day in the life as it were, partying like it was 19..., um, 399 AD.

PS For folks interested in the book but who prefer to listen to it, there are many recordings, including a free offer back in August. Of course, it's probably available in audio in most library systems, too.

CF Meetup meeting time update for this week

Note: This blog post is from 2008. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
When I posted my weekly announcement about this week's meetup, I mistakenly listed the second talk (with Tom Chiverton) as being at 3pm US EDT. Instead, it's at 2pm.

I've updated that entry, but those who get the feed of this blog won't get notified of that update, I've decided to do this new entry.

"Intermediate ColdSpring: Remote CFCs", with Tom Chiverton

Thursday, Oct 16, SPECIAL TIME 2:00pm US EDT (GMT-4)

Meeting description, details, optional RSVP

The unusual time in the early afternoon (in US Eastern time) is because our presenter is in London, where it will be his 6pm.

Of course, the first talk (at noon, with Isaac Dealey) is on at its scheduled time. More info in the notice last week.

Several SQL Server Performance Tuning how to's

Note: This blog post is from 2008. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
Need to solve problems with SQL Server performance? Here are several resources that can help:

Some of these offer knowledge and understanding, others offer specific steps to follow. Most offer links to still other resources (including often specific entries in Books Online).

Note that some may be written more to those still running SQL Server 7 (less likely) or SQL Server 2000 (not so unlikely), though many do cover SQL Server 2005 as well. Just keep this in mind while reading, both if some step doesn't seem to follow, and also in case it may be that some setting that suits one release may not suit another. In fact, some of the resources specifically discuss how things have changed in later releases, and how in fact some settings or techniques for older releases may be very different for later ones. All this just calls for discernment while you read.

These are all in addition to a couple of entries I wrote back in April (starting here) on some other advanced tools and techniques for diagnosing SQL Server problems.

Sometimes CF gets blamed for problems when in fact the problem is in the DBMS--and it's not always a problem due to the SQL being sent from CF. Sometimes the same code can run very differently one time than another. In that case, you really need to understand why this is happening. I hope the resources above may help you. If you ever want direct assistance, this is one of the things I help people with in my available consulting.

More Entries

Copyright ©2020 Charlie Arehart
Carehart Logo
BlogCFC was created by Raymond Camden. This blog is running version 5.005.
(Want to validate the html in this page?)

Managed Hosting Services provided by
Managed Dedicated Hosting