Friday, March 9, 2007

Installing Coldfusion MX 7 on Vista with IIS 7

This details installing Coldfusion 7 on a Vista Ultimate x64 core duo laptop (HP dv9000)

Once installed, Coldfusion seems to work fine. The problem comes from the Installer and Coldfusions lack of knowledge about IIS 7. There are a number of good guides that have been put together that helped tremendously, though they all were just a little bit different then the final process I used. They are good sources for screen shots of the process. See:

Michael Imhoff's Blog, and
Falken's web

There are a couple of things you will need before you get started:

1. You need to be performing the install from an account with Administrator privileges.

2. You need a copy of jrun.dll from a working installation of Coldfusion 7. The best thing to do is just copy the following directory "c:\cfusionMX7\runtime\lib\wsconfig\1" and its contents to a location you can later get to.

3. A copy of Coldfusion 7 installer (something like coldfusion-702-win.exe).

4. Though the new User Access Control (UAC) is a pain at times, I found it needs to be turned on in order to run programs with the compatability wizard as an administrator which is required. I lost a lot of time till I figured this out.

5. IIS is not installed by default, so you will need to install it. Go to the Control Panel, click on Programs, then click on "Turn Windows features on or off". Here you need to turn on Internet Information Services. Also, in the Application Development Features branch, make sure to turn on "ISAPI Extentions" and ISAPI Filters". In one blog I saw, some suggested turning on "IIS6 Management Compatability" I discovered this wasn't needed and actually caused me some problems.

6. Create a shortcut on your desktop for the Compatability Wizard. It is possible to accomplish the same thing by modifying the compatability parameters of a file in the FIle Explorer, but this is cleaner and less prone to problems. Create a shortcut by right clicking on the desktop, selecting New, then selecting Shortcut. For the location, type "%SystemRoot%\system32\mshta.exe res://%SystemRoot%\system32\acprgwiz.dll/compatmode.hta" (Thanks to Michael Imhoff for that). You can use this to install other apps as well.

Now you are ready to install Coldfusion 7.

1. Start the Compatability Wizard by clicking on the shortcut you just created. Click Next. Choose "I want to locate the program manually" and click next. Click on Browse and find the Coldfusion installer app you downloaded from Adobe and select it. Click on Next. Select Microsoft Windows XP (service Pack 2) and Click Next (Michael Imhoff said use 2000 as XP would not work, I found the opposite to be true in my case). Check "256 colors" and Click Next. Check "Run this program as an administrator" and Click Next. You should then proceed with the installation as normal. If you followed these steps, you hopefully shouldn't get the javaw.exe failure message which I became very familiar with. If you do, try using Windows 2000 instead of XP and see if that helps.

2. Remember that directory we copied before from a different installation ("c:\cfusionMX7\runtime\lib\wsconfig\1"). Copy that to the new install in the wsconfig directory (i.e. "C:\cfusionMX7\runtime\lib\wsconfig\1").

3. We now need to create handler mappings to tell IIS where to go for cfc, cfm or cfml files. Open the Computer Management Console. Easiest way to do this is just go to the start menu and type "Computer Management" into the search field at the bottom and hit return. Expand "Service and Applications" then Click on "Internet Information Services (IIS) Manager". In the center you will now see some icons one of which is labeled "Handler Mapping". Double Click on that. Now click on "Add Script Map..." on the right. You will get a dialog box. for Requested path enter "*.cfc", for Executable enter "c:\cfusionMX7\runtime\lib\wsconfig\1\jrun.dll" for Name enter something unique like "cfc" or "Coldfusion cfc". Then Click on OK.

4. Create 2 more handlers for cfm and cfml files. They are done in the same way by clicking on "Add Script Map.." then using *.cfm or *.cfml for Request path. They should have the same Executable of "c:\cfusionMX7\runtime\lib\wsconfig\1\jrun.dll". Each name should be unique. Some people have said to add an ISAPI Filter as well. I found this caused me problems as it then tries to run every file through jrun.dll, not just the coldfusion files.

5. Go back and from the set of icons, Click on "Default Document". Add ", index.cfm, index.cfml" to the File name(s) string.

6. Finally, There is one panel in the Computer Management Console called "Connections". Click on"Application Pool". On the right in the "Actions" panel, Click on "Set Application Pool Defaults". A new window opens up. Under General, set "Enable 32-Bit Applications" to true.

You can close the console now and Coldfusion 7 should work properly. If you have a different configuration or machine, there are no guarentees.

0 comments: