Showing posts with label ColdFusion. Show all posts
Showing posts with label ColdFusion. Show all posts

Tuesday, November 28, 2006

ColdFusion Hosting at HostMySite.com

I recently launched a new site that's being hosted on HostMySite.com. It's been quite some time since I've had a site that wasn't hosted in house and have to admit that using HostMySite was painless.

Model-Glue works with their setup out of the box, and they were extremely helpful as we got things setup for the first time. You have to love 24*7 tech support that's actually 'with it'.

My only complaint is that I didn't have access to restore or backup my database, so I had to rely on DTS, although they can do these things for you if you request it. I imagine this is an issue with most shared hosts as SQL Server security surrounding restore and backups isn't easy to hand out to everyone.

Saturday, November 18, 2006

Another ColdFusion Engine?

So, as of November 2nd, there is another free implementation of ColdFusion, called the 'smith project'.

http://www.smithproject.org/faq.cfm

It sounds like they have quite an uphill battle to get to the level where BlueDragon and Adobe's ColdFusion is. But regardless, this could be interesting if they change it to an open source model and let people run with it.

Thursday, October 26, 2006

CFMX Setup on Vista

I just installed CFMX 7 on Vista Ultimate but it wasn't a very streamlined process. The CFMX installer doesn't support IIS 7 so a number of manual steps were needed after the fact. There is also a compatibility adjustment that you must make.

First, you need to run the ColdFusion Installer using the Program Compatibility Wizard. This will normally appear after the installer hangs. If it doesn't, the location to create a shortcut with is "%SystemRoot%\system32\mshta.exe res://%SystemRoot%\system32\acprgwiz.dll/compatmode.hta". There are a few options that you are going to want to choose.

  • Microsoft 2000 (Using Windows XP will not work)
  • On the next screen, choose 256 colors and all of the 'disable' options
  • Next, make sure you run this program as an administrator
This should get you through the basic install. For whatever reason, the isapi filter that normally handles each request is not created. A Script Map needs to be created in the Handler Mapping in IIS for your server.

Prior to setting up the Handler Mappings, you need to download jrun.dll from another installation and make sure that file exists in the following directory : 'c:\cfusionMX7\runtime\lib\wsconfig\1' -- You may want to simply copy the entire "1" directory under wsconfig.

First, pop open the IIS Console which looks like so, although you probably won't have either of the ISAPI options if you did a default install of IIS.

You will want to then open up the Handler Mappings option and create a new Script Map. You need to create one for your cfm files and another for your cfc's.

When you're done, the list of Handler Mappings should look familiar to this.

A this point, you should probably restart CF and IIS and give it a go.

Thursday, October 12, 2006

CreateTimeSpan() and Session Timeouts

I wanted to determine how long my sessionTimeout value was set for in a given application. After quite a bit of trial and error, a 'value' created with CreateTimeSpan() can be reverted or converted to minutes by using the following calculation:

value * 24 * 60

So, to put that in perspective when using session timeouts, the following code would be applicable.

<cfset appinfo = createObject('component', 'application')>
<cfdump var="#evaluate((appinfo.sessionTimeout * 24 * 60))#">

Sunday, September 17, 2006

Working with arguments in Model Glue

I ran into an interesting issue with arguments while using the model glue framework. The argumentExists() method and the getArgument() method do not work well together when performing an iff(). For example:

iif(local.arguments.event.argumentExists('showAllCompanies'), de(local.arguments.event.getArgument('showAllCompanies')), de(''))

The same code rewritten in the more archaic fashion works perfectly such as:

if( local.arguments.event.argumentExists('showAllCompanies') ){ local.showAllCompanies = local.arguments.event.getArgument('showAllCompanies'); } else { local.showAllCompanies = ''; }

Very frustrating, but then again, an easy workaround once you know it.

Wednesday, April 05, 2006

Missing Template Handler in ColdFusion MX 7

Setting up the missing template handler in ColdFusion MX 7 and actually getting it to work correctly is a little more involved than most would think. Here are the steps to get it set up correctly, and some details that aren't very apparent.

  • Open the ColdFusion MX 7 Administrator.
  • Determine what error handler should be used.
    I needed to setup the missing template handler for http://localhost/client1/. This meant that I needed to use /client1/common/error.cfm as my missing template handler value. The ColdFusion Administrator states to use a relative path, but this is really an absolute path from the webroot (this applies to the site-wide error handler as well).
  • Create a ColdFusion Mapping for this virtual directory.
    While attempting to do the above, the administrator kept telling me that the site wide administrator does not exist. To rectify this, you need to temporarily setup a ColdFusion mapping with the following attributes.
    Logical Path: /client1
    Directory Path: [insert path to 'client1' folder here]
  • Go back to the settings page and hit save. The CF Administrator shouldn't have an issue with your handler at this point in time.
  • You then need to setup your website or virtual directory in IIS so that it knows to use the CF 404 page, and that it needs to check for missing files.
    Please see http://www.macromedia.com/go/95ee04fb for more information.
  • Restart IIS and CF and everything should be working.

Items to note:

  • Once you setup IIS to check for files, 404 error messages will no longer be logged by ColdFusion. I'm assuming this is because IIS supercedes CF when it comes to 404 errors when configured similar to above.
  • When following these instructions, the error handler stays in effect even if the missing template handler is removed from the CF Administrator.
  • The ColdFusion Mapping that is required in order to successfully validate the Missing Template Handler value can be deleted once the handler is in place and accepted by the CF Administrator.

Saturday, April 01, 2006

Working with the ColdFusion MX Internal Web Server

Here is a good technote from Macromedia that describes the following items:

  • Using the built-in web server
  • Disabling the web server
  • Changing the default port number
  • Changing the root directory
  • Enabling different filename extensions
  • Disabling or enabling directory browsing
  • Adding a default document type
  • Adding a virtual directory or web mappings

http://www.macromedia.com/support/coldfusion/adv_development/config_builtin_webserver/