ColdFusion running from in-built webroot first

October 14, 2009

I found something in ColdFusion today that had me stumped for a bit. It's not a bug, just a bit odd! What I discovered is that if you install ColdFusion in the default location on Windows it creates the folder C:\ColdFusion9\wwwroot\, which is the web root if you're using ColdFusion's in-built webserver. I've got ColdFusion set up to be used with Apache, so my web root is C:\xampp\htdocs\.

However, if I have a directory with a script in the ColdFusion webroot and the same directory and script name in the Apache web root. ColdFusion will execute the script in the ColdFusion webroot. It was only when I turned on execution times in the debugging that I figured out why my code changes were having no effect.

I guess this is a pretty rare situation, but a very confusing one!


2 comments

  1. It's been this way since CF6 ... but can be a real niggly one to catch.

    Comment by Andy Allan – October 14, 2009
  2. Hi Andy, I figured it probably wasn't a new thing, but I'd never seen it before. I really thought I was going mad and must have restarted CF a dozen times and even switched editors!

    Comment by John Whish – October 14, 2009

Leave a comment

If you found this post useful, interesting or just plain wrong, let me know - I like feedback :)

Please note: If you haven't commented before, then your comments will be moderated before they are displayed.