ColdFusion MX 6.1 with Apache 2.2 on Windows

Tags: 

Apache 2.2 was released to a mixed fanfare. While everyone was pleased at the improvements most had to rest on their laurels while their web programming technology of choice was updated accordingly. At the time of writing, PHP 5.1 and 4.4 have an unofficial connector available (unless you want to run the unreleased 5.2 code), Ruby on Rails has several ways of working with it, and many others have received updates. Adobe's ColdFusion MX 7 was given an update which provides compatibility, but the company decided against including (the older though still officially supported) 6.1, so officially users of 6.1, my current employer included, are up the proverbial creek without an equally proverbial paddle. Or so we thought.

Before I explain how I did this, I just wanted to mention that Adobe does not officially support running CFMX 6.x with Apache 2.2, and neither they nor I am responsible if this turns your web server to mush. Proceed at your own risk.

As it turns out, presumably thanks to the wonders of Java binary compatibility, the official ColdFusion MX 7 connector works with ColdFusion MX 6.1, though I had to tweak the instructions a little. Here's what you need to do to get it running on Windows:

  • You'll need both ColdFusion MX 6.1 and Apache 2.2 installed and running correctly.
  • Stop both the Apache and ColdFusion services.
  • Make a backup of both the Apache and ColdFusion directories.
  • Start up the ColdFusion services again.
  • Download the updated connector file from Adobe's site (read the full release instructions if you want).
  • Extract the wsconfig.jar file from the wsconfig.zip file you just downloaded and put it under your ColdFusionMX directory under runtime\lib, e.g. C:\CFusionMX\runtime\lib. It will ask if you want to overwrite the existing file, so click Yes.
  • Open up the command prompt and move to the runtime\lib directory, e.g. CD \cfusionmx\runtime\lib.
  • Enter the following command all on one line:

    java -Dtrace.ci=1 -jar wsconfig.jar -ws apache -dir /apache2.2/conf -bin /apache2.2/bin/httpd.exe -coldfusion -v

    where "/apache2.2/" is the directory you have Apache 2.2 installed. Note that I have both ColdFusion and Apache installed on the same drive so didn't have to give any drive letters, and I used the UNIX-style directory separator (forwards-slash) instead of the Windows-style (backslash).

  • If you got an error message that said
    'java' is not recognized as an internal or external command, operable program or batch file.

    then you need to close your command prompt window, download and install the Java Runtime Environment (JRE) v1.4, and try again.

  • Presuming everything worked correctly you should see the following in your command prompt window:

    Macromedia JRun 4.0 (Build 107948)
    os.name: Windows 2000
    os.version: 5.0
    os.arch: x86
    platform: intel-win
    Extracting resource connectors/installers/intel-win/prebuilt/jrunwin32.dll
    file defaulted
    last modification date: Thu Apr 06 13:07:04 EDT 2006
    size/compressed size: 73728/26315
    to D:\CFusionMX\runtime\lib\wsconfig\jrunwin32.dll
    Created file D:\CFusionMX\runtime\lib\wsconfig\jrunwin32.dll
    findServers(): found server default at 127.0.0.1:2901
    Found JRun server default at 127.0.0.1:2901
    this host is tlcweb:205.241.27.208
    web server: Apache
    web server directory: D:/Apache2.2/conf
    verbose connector logging: false
    apialloc: false
    force resource extract from jar: true
    CFMX: true
    mappings: .jsp,.jws,.cfm,.cfml,.cfc,.cfr,.cfswf
    filter mapping prefix: false
    Using Apache binary D:\Apache2.2\bin\httpd.exe
    Server version: Apache/2.2.3
    Apache 2.2.3 is recognized
    isValidVersion(): Apache is 2.2.3
    Compiled in modules:
    core.c
    mod_win32.c
    mpm_winnt.c
    http_core.c
    mod_so.c
    Parsing Apache configuration file D:\Apache2.2\conf\httpd.conf
    Extracting resource connectors/apache/intel-win/prebuilt/mod_jrun22.so
    file defaulted
    last modification date: Thu Apr 06 13:07:04 EDT 2006
    size/compressed size: 65536/25836
    to D:\CFusionMX\runtime\lib\wsconfig\3\mod_jrun22.so
    Created file D:\CFusionMX\runtime\lib\wsconfig\3\mod_jrun22.so
    getProxyServerUrl(): 127.0.0.1:51010
    Wrote file D:\Apache2.2\conf\httpd.conf
    Added JRun configuration to Apache configuration file D:\Apache2.2\conf\httpd.conf
    Created file D:\CFusionMX\runtime\lib\wsconfig\3\README.txt
    Wrote file D:\CFusionMX\runtime\lib\wsconfig\wsconfig.properties
    Error stopping service. The web server must be restarted to complete this operation.

  • At this point start up the Apache server and try loading a CFM file. :-)

11 Comments

I ran into the same thing

I ran into the same thing when trying to get CF 7 running on my new SuSE server. It ran Apache 2 as well.

I'm having the same problem

I'm having the same problem until I read this but now I'm getting an error that says:

Created file C:\CFusionMX7\runtime\lib\wsconfig\jrunwin32.dll
findServers(): found server coldfusion at 127.0.0.1:2920
Found JRun server coldfusion at 127.0.0.1:2920
JRun server default cannot be found on host 127.0.0.1.
Confirm that JRun server 127.0.0.1 is started.

Clayton, are you running

Clayton, are you running CFMX6 or 7? Did you have CFMX running when you ran the 'java' command?

I have CFMX7 and yes it is

I have CFMX7 and yes it is running I also have JRun running but now I get a new odd problem:

Created file C:\CFusionMX7\runtime\lib\wsconfig\jrunwin32.dll
findServers(): found server default at 127.0.0.1:2908
Found JRun server default at 127.0.0.1:2908
findServers(): found server admin at 127.0.0.1:2910
Found JRun server admin at 127.0.0.1:2910
findServers(): found server coldfusion at 127.0.0.1:2920
Found JRun server coldfusion at 127.0.0.1:2920
this host is toshibauser:192.168.1.100
Exception occured trying to get an MBean

I tried the fix the site recommended and it run fine but I can't view the index.cfm file for CF admins and my apache server won't start yet.

I just went to using Apache

I just went to using Apache 2.2.3 and Coldfusion MX 6.1 since they work. Version 7 doesn't seem to work for some reason.

If you get the MBean error it

If you get the MBean error it is because the wsconfig is using a 1.5 or later version of the JVM.

http://www.adobe.com/go/fa9e26a2

Go through and uninstall the later JVM and reinstall the 1.4.2_x (I did 1.4.2_13). When you command line again if you get the "JRun server default cannot be found on host 127.0.0.1. Confirm that JRun server 127.0.0.1 is started." Then try adding the -server parameter to the command line and make sure that your virus software is disabled.

@Damien - Thanks for posting

@Damien - Thanks for posting this... it saved me a lot of time today. One thing worth noting is that you don't have to download a jdk/jre if you get the "'java' is not recognized as an internal or external command, operable program or batch file." error. You can simply run the command using ColdFusion's JRE by running the command from the \cfusionmx\runtime\bin directory. You just have to provide the full path to wsconfig.jar as follows (using your example above):
java -Dtrace.ci=1 -jar /cfusionmx/runtime/lib/wsconfig.jar -ws apache -dir /apache2.2/conf -bin /apache2.2/bin/httpd.exe -coldfusion -v

Thank God for all you guys...

Thank God for all you guys... I pulled my hair out for about 3+ hours before I found this site. I'm up and running with Apache 2.2.4 and ColdFusion MX 6.1.

Glad to be able to help,

Glad to be able to help, DJ.

FYI, I've got this setup running with about a dozen sites (hundreds of domain aliases) in a production environment and it is working great.

Trying this with Coldfusion

Trying this with Coldfusion MX 6.1 Pro, Apache 2.2.11, and Windows XP SP3, I got the following error:

This web server is already configured for JRun

I had already tried to configure the server per the installation utility. The fix is to simply delete the entire contents of the runtime/lib/wsconfig directory. You may wish to include that in your instruction list prior to running the utility.

Thanks for the tips overall -- it seems to be working for me.

How to reply

Care to add your own 2 cents? Let me know via Twitter or my contact page.