ColdFusion 8 and Apache on Windows XP

July 22, 2008

A quick and painless guide to setting up ColdFusion 8, Apache and MySQL on a Windows XP workstation.

Download XAMPP

http://www.apachefriends.org/en/xampp.html

Install XAMPP

Destination Folder: c:\xampp\
You can choose to install Apache as a service if you want (I didn't, but you can add it later).
Once installation completes fire up XAMPP Control Panel and stop Apache if it is running

Download ColdFusion 8.0.1

http://www.adobe.com/cfusion/tdrc/index.cfm?product=coldfusion

Install Coldfusion 8.0.1

Tick the "developer edition" option
Choose the "Server configuration" option
Select the subcomponents you want to install. You don't need any of them to run ColdFusion code, so unless you want them I'd untick them.
Destination Folder: c:\Coldfusion8\

When you get to the "Configure web server connector for ColdFusion" screen, click the "add" button.
Select "Apache" from the dropdown list
Enter "C:\xampp\apache\conf" as your Configuration Directory
Enter "C:\xampp\apache\bin\apache.exe" as your server binary path
Click "OK"
Click "Next"
Change the directory for the Administrator Location to: "C:\xampp\htdocs"

The rest is pretty straight forward. You can turn RDS on if you want to use CFEclipse or Dreamweaver to connect to your database for code generatation, otherwise you can leave it off.

Once ColdFusion has finished installing, you need to start Apache.  If you closed the XAMPP Control Panel you can find it in your start menu.

Fire up a browser and enter "http://127.0.0.1/CFIDE/administrator/index.cfm" into you address bar. Hopefully you should see a nice ColdFusion admin screen!

MySQL

XAMPP also installs MySQL and the phpMyAdmin tool for maintaining you MySQL databases.

PHP

If you do need to run PHP on your local box then XAMPP will set this all up for you. I have had to tweak the ini files to get some thing to run. Here is a quick guide:

cURL

This is a pain (but it makes you appreciate ColdFusion!),

You can find out more about Apache by downloading the free ACME ebook from http://www.acidlabs.org/public-speaking/goodies/


29 comments

  1. Just wanted to drop you a quick thanks for instructions. Simple setup using XAMPP and Coldfusion. Saved me a lot of time trying to figure it out.

    Comment by Ralphie – August 19, 2008
  2. You're welcome Ralphie :)
    You do also get the benefit of (dare I say it) having phpMyAdmin for administering your MySQL databases.

    Comment by John Whish – August 19, 2008
  3. Great article! Only I already installed Xammp as well as coldfusion8, now I still don't know how to link my appache server to coldfusion since there's no option to add a server in the coldfusion administrator panel. How do I go from here?
    Thanks for any help you could provide me...I'm a newbie to coldfusion.

    Comment by Frank Franckx – September 03, 2008
  4. Hi Frank,

    Welcome to ColdFusion :)

    I'm guessing that you already had ColdFusion installed (with the standalone server running on port 8500) before you put XAMPP on. You should be able to change ColdFusion's configuration files to point to Apache but it is not going to be simple and I wouldn't recommend it!

    I'd suggest uninstalling ColdFusion and then following the guide above.

    If you've got a bunch of settings in the CFIDE you want to keep then have a look at the Packaging & Deployment > ColdFusion Archives screen in your CFIDE to backup and deploy settings.

    Good luck! Let me know how it goes.

    Comment by John Whish – September 03, 2008
  5. Hi, I followed this guide to install CF into XAMPP, and now I'm getting 403's for all of my CF directories.

    Thoughts?

    Comment by Jaime – September 29, 2008
  6. @Jamie, this is probably because Apache doesn't have index.cfm set as the default file and directory browsing is disabled.
    You can change the default file in your virtual hosts file by adding this line:
    DirectoryIndex index.cfm index.html

    Comment by John Whish – September 30, 2008
  7. Dear John,

    the comment about PHP reads:

    If you do need to run PHP on your local box then XAMPP will set this all up for you. I have had to tweak the ini files to get some thing to run. Here is a quick guide:

    The trailing ':' implies that there is something to follow. But if I have understood your article correctly whatever it is is not there. Could you please help me out here because I am a real newcomer to Xampp & CF and I would like to get things right from the beginning.

    many thanks


    Michael

    Comment by Michael Message – October 27, 2008
  8. Hi Michael, most PHP code will run fine without any tweaking on XAMPP.

    My additional information was about setting up cURL which isn't part of the standard XAMPP setup. But if you don't need cURL then you don't need to do anything. XAMPP sets everything up to be a good development environment (don't use it on your production webserver) so most things should run without any issues.

    Comment by John Whish – October 28, 2008
  9. Great, thanks John.

    The instructions were simple enough for me!

    Andy

    Comment by Andy – January 27, 2009
  10. Hey, when I open 127.0.0.1/CFIDE/administrator/index.cfm in a browser I get a open or save dialog box. Is there a easy fix for this?

    Thanks

    Comment by John – February 02, 2009
  11. @John, It sounds like Apache doesn't know about ColdFusion so is trying to server cfm files as plain text. You'll need to configure Apache; here's a couple of links that might help:

    www.simonwhatley.co.uk/configuring-coldfusion-8-with-apache
    www.danvega.org/blog/index.cfm/2007/8/3/Installing-ColdFusion-8-amp-Apache-224-HTTP-Server

    Comment by John Whish – February 02, 2009
  12. Greetings

    I'm having a problem with the FORM variables.

    When I use localhost and I submit a form. the form variables are correctly set in the action cfm.

    But if I load the page using an URL other than localhost the form variables are not being set. I dump "form" in the action cfm and it's empty.

    I suspect that it's somehow related with the restrictions of the developer edition of coldfusion. But it's supposed to work with the localhost AND 2 other computers.

    Any thoughts? Is there a way to workaround this.

    Thans

    Comment by Julian – March 21, 2009
  13. Hi Julian, If you're just calling the page without submitting the form then the form scope wil be blank. Do you mean that when you change the form action url to something other than localhost, when you submit the form the form struct is blank?

    Comment by John Whish – March 23, 2009
  14. Hey John!

    Thanks! Having trouble all day with CF & MySQL. I've used XAMPP before and just when I thought I was ready for therapy, I finally decided to search for all 3, your article popped up and installed like a dream. Thanks, Greg Smith

    Comment by Greg Smith – March 26, 2009
  15. @Greg, Glad it helped :)

    Comment by John Whish – March 27, 2009
  16. thank you very very much! :)

    Comment by dany – May 17, 2009
  17. (June 09) Sweet instructions - to the point and accurate - I loaded 1.7.1 (Apache) and Cold Fusion 8 and Windows XP. Worked first time - only comment I would make on your instructions is clearly informing users to load Apache first (I didn't the first time!). Thanks a bunch again - Now all I need is to find someone in the Preston area (UK) to teach me it all so I don't spend months learning what might in weeks with an expert - any suggestions?

    Comment by Mark Boast – June 28, 2009
  18. Hi Mark, good here you are up and running. Yes, you need to install XAMPP (with Apache) before you install ColdFusion. I'm afraid I don't know any experts in Preston, but there are plenty of mailing lists and blogs where you can ask questions.

    Comment by John Whish – June 29, 2009
  19. Hi, had to remark that after hours searching I've found someone with the exact information I needed. By the time I found this post though I had already worked these steps out EXACTLY as they are stated here. However I very much appreciate the info if only just as confirmation that I did everything as I was supposed to. Being new to the 'scene' I'm constantly learning. It was great to see someone with a setup like mine (i.e: winxp, xampp (apache, php, mysql), coldfusion). I am at the stage now of going through online tutorials to learn how I can complete the site I started this journey to create. After designing my four common pages with DW and PShop the next task is to work out how to have the 1100 or so pages of products and content inserted as needed. I looked at DW templates at first but that got messy so I am hoping that CF will meet the challenge. It seems a mountain of information but I'm enjoying the climb.

    Thanks again for the steadying hand and if you know of any good learning tools, tutorials or forums for a total novice using just that combination of dev tools, please let me know.

    Comment by Adam – July 20, 2009
  20. Hey Adadm, welcome to the world of ColdFusion :)

    Glad the guide was useful. A server side language is definitely what you need to build an online shop. As for tutorials, then I can't think of any specific ones off the top of my head but the Adobe livedocs are pretty good. I think this might be a good place to start; livedocs.adobe.com/coldfusion/8/htmldocs/sql_01.html

    Good luck!

    Comment by John Whish – July 21, 2009
  21. Hi John,

    Back in March I installed Cf & XAMPP and evrything's been working fine for months, then all of a sudden, it says the website encountered an error and can't be shown. I don't even know where to begin to get help, do you have a solution or can you point me in the right direction? Thanks,
    Greg

    Comment by Greg Smith – August 15, 2009
  22. @Greg, not sure from your comment if it is Apache or ColdFusion that is causing the issue. Might be worth finding out if you can run a simple PHP script to eliminate that and then have a look at ColdFusion. It is sometimes possible to copy the XML files from your WEB-INF directory, if you've got another server which is running.

    Comment by John Whish – August 17, 2009
  23. Thanks John,
    This is kind of strange, but when I disabled my firewall, I still had problems, then on a whim, I uninstalled my firewall and everything went normal again. Thanks,
    G

    Comment by Greg Smith – September 04, 2009
  24. I have xammp loaded. PHP pages do fine.
    I loaded CF 8 - got it working on local host.

    I started adding virtual hosts in Apache

    Went to set up website in CF the admin page would not come up. Page not found

    I tried using the IP address of the webserver instead of 127.0.0.1 /
    No luck

    Uninstalled CF and tried again.

    Now when I select Apache

    I get to the setup of the "Directory for Binary" in apache/bin/

    There is no apache.exe file

    there is "apache_monitor.exe"

    Or
    "httpd.exe"

    files.

    I now get an error that CF8 does not support this version of apache.

    It is apache 2.1 which is listed by CF as supported.

    Any help greatly appreciated

    Comment by Terrymod – November 25, 2009
  25. @Terrymod, the newest version of XAMPP is a bit different to the version in this post. You need to point at C:\xampp\apache\bin\httpd.exe instead. ColdFusion 8 should run fine.

    Comment by John Whish – November 26, 2009
  26. I installed and configured ColdFusion 9 with XAMPP - apache.

    I have a question how to set the port (don't work localhost:8500) when you add a new server. I do not know how to configure the ColdFusion Builder, when I add a new server under the heading "Local Server Settings" where you must enter a home server and path, and then in the Document Root - what are the settings for XAMPP - apache.

    Comment by Marylka – June 05, 2010
  27. @Marylka, if you have installed ColdFusion to use Apache (which comes with XAMPP), then you should be able to use port 80.

    Comment by John Whish – June 10, 2010
  28. part of the cool thing with xampp is that it is portable. if you change the folder location on your pc, or even to a new pc, all you have to do is "setup" xampp again and all is good.

    if coldfusion is installed, say, in the xampp directory, does the xampp installation still have this portability? or, due to the coldfusion installation, is it tied to the system and path you set it up on?

    Comment by jz – August 30, 2010
  29. @jz, good question and I'm not sure I know the answer! You normally wouldn't install ColdFusion in the same folder as XAMPP, although the CFIDE (administrator) need to be in the web root (or mapped). So I'd expect it to still be portable although I've never tried.

    Comment by John Whish – September 01, 2010

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.