JavaScript appears to be disabled. We recommend you enable JavaScript while visiting this site.

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

Installing ColdFusion MX 7.0.1 on a local Windows-based, Apache, server

Note: For information on updating to ColdFusion MX 7.0.2, see Upgrading our installation of ColdFusion MX 7.0.1 on a local Windows-based, Apache, server.

Update: October 10, 2006 @ 7:11 pm - Thanks to Michael Bryce for his helpful comments regarding this documentation.

In this article, we'll be walking through an installation of ColdFusion MX 7.0.1, Developer's Edition. Since we've already covered the installation of ColdFusion MX 6.1, Developer's Edition, you may already have CFMX 6.1 on your computer, like I did while writing this guide. If you do, that's okay (since I do). Otherwise, your installation will vary slightly.

First, we'll need to download the installer for the Developer's Edition. This can be downloaded from http://www.macromedia.com/software/coldfusion/trial/. The download size is almost 300 MB, so you may have a wait on your hands.

While you're waiting, if you've already installed ColdFusion MX 6.1, you can backup the CFIDE and cfdocs folders in your Web directory. If you've been following along, this would be c:\home\ (or whatever your DocumentRoot has been set to in your Apache httpd.conf file). Put a copy in a new folder called CFMX6.1_docs.

Now, even if you haven't installed CFMX 6.1, make a copy of your httpd.conf file, found in C:\Program Files\Apache Group\Apache\conf, and place it along with your other httpd.conf backups, or in your downloads folder (c:\home\downloads\ if you've been following along). Make a note that this is before the installation of CFMX 7.0.1. For example, httpd_20060319_PreCFMX7.01.conf (where 20060319 is the last date this file was changed).

Also, make sure ColdFusion MX 6.1 is stopped (and that it won't start up when you start your computer). Remember, this is in the Services control panel, and the item you want is the ColdFusion MX Application Server. Change this to Manual, and make sure it's stopped. If you haven't installed ColdFusion MX 6.1 before, then skip this step.

Note, you could just uninstall ColdFusion MX 6.1 as well. Your call, depending upon how much hard drive space you have.

Once your download has completed, start the installer.

Click next, reading as you go, until you're asked where to install ColdFusion MX 7. Keep the default of C:\CFusionMX7\.

Next, if 6.1 is installed, you'll have the ability to either configure Apache to use 7.0.1, or use ColdFusion MX 7.0.1's built-in server to run both 6.1 and 7.0.1. We don't really need both, so let's just “Configure my web server for ColdFusion MX (recommended)”.

Next, you'll need to “Add Web Servers/Sites”. Enter the following information.

Web Server: Apache
Configuration Directory: C:\Program Files\Apache Group\Apache\conf
Directory and file name of server binary: C:\Program Files\Apache Group\Apache\Apache.exe

Select OK, followed by Next.

On the next screen, change the web root to c:\home (or whatever your DocumentRoot has been set to in your Apache httpd.conf file), and select Next. Here, enter an Administrator password twice. On the next, keep RDS enabled, and just use the same password you entered for the Administrator.

Thanks to Mike Bryce for pointing out that there are actually two places you need to enter your Web root directory. The first is for the DocumentRoot, and the next is a dozen lines down in a Directory tag. The following is a snippet from the Apache 1.3.x httpd.conf file, which is very similar to the Apache 2.0.x httpd.conf file (for this particular section). The two important lines are bold.

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "c:/home"

#
# Each directory to which Apache has access, can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# permissions.
#
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "c:/home">

Finally, you'll see that ColdFusion MX 7.0.1 requires 426 MB of space, so go ahead and Install.

Once the installation has completed, go backup the httpd.conf file again (httpd_20060330_PostCFMX7.01.conf was mine). Next, restart Apache, and head over to the ColdFusion Administrator, at http://localhost/CFIDE/administrator/index.cfm.

Type the password that you just created, which will begin the server configuration, which may take a short while.

Since we've already setup some data sources (if you've been following along), we'll need to do some migration. It'll first export your settings, and then import them. Finally, click OK to start the ColdFusion Getting Started Experience.

Note that index.cfm may need to be setup as a directory index. Open the httpd.conf file, search for DirectoryIndex, and add index.cfm and index.cfml to the second instances' line. For example:

DirectoryIndex index.php index.cfm index.cfml index.html index.htm

Restart Apache if you need to add these.

If you've already setup MySQL or PostgreSQL, or both, then you can now run the CFM files that we created early to verify our connections, as well as use the Data Sources area (under Data & Services). If you're testing PostgreSQL, make sure you copy the jar file to the C:\CFusionMX7\lib folder (if you've been following along, something along the lines of postgresql-8.1-405.jdbc3.jar).

And with that, you've successfully setup ColdFusion MX 7.0.1 on an Apache server.

You may want to setup ColdFusion MX 7 Application Server (in Services) to startup manually, instead of automatically.


Note that it's completely possible to now run both ColdFusion MX 6.1 and 7.0.1 on the same instance of Apache, albeit not at the same time. The following is only for advanced users.

You'll remember that we created a copy of the CFIDE and cfdocs folders from ColdFusion MX 6.1. If you now create a copy of these folders for ColdFusion MX 7.0.1, you'll have a copy of each folder for each installation. I also suggested you create a backup of your httpd.conf file both before and after our upgrade. If you do a comparison on the httpd.conf file, using a program like WinMerge, you'll see the exact lines that got changed.

Stop ColdFusion MX 7 Application Server, and Apache. Now, swap (making sure you don't overwrite your copy of the MX 7 files) the httpd.conf file and CFIDE and cfdocs folders from the 7.0.1 installation, to the 6.1 installation. Start Apache, and once it's started, start the ColdFusion Application Server (for 6.1). Hit the Administrator page and you're now running 6.1.

You can switch back to 7.0.1 at any time by stopping the Application Server, Apache, and swapping the two folders and one file.

Keep in mind that if you try to log in to ColdFusion Administrator, but see 'gobbledygook', that probably means that you've got the wrong CFIDE and cfdocs folders for the version you're running. Swap in the correct folders, or change to the other version.

Have fun, and stay safe.

View all of the steps to creating a local Web server, for development.

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

Google Code: Web Authoring Statistics

Here's an interesting article out of the Googleplex: Google Code: Web Authoring Statistics.

It's a look at code from December of 2005, and shows some interesting coding mistakes. Too bad more software doesn't (can't?) follow W3C standards ...

EDIT: It's great that Google has done this, but I'd like to hope that they'll continue to do this. As one of the links from Google attests, it's time for Web developers to look at standards, from the top down, and begin implementing them. If someone isn't implementating standards, then they need to be helped.

And, the old guides out there that are written in the times of pre-CSS need to get cleaned up as well. But since that's not going to happen, we've got to keep our own code clean.

Tags:

Categories: Internet

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

'Just enough HTML to be dangerous'

This time, we'll be covering the minimum HTML knowledge required to be truly dangerous. While an expanded understanding of HTML is not, per se, required, having at least some understanding will help in a number of ways. Of course, the more HTML you know, the less you rely on tools to do the work (which is a good thing, since we're not always able to use the tools that we're familar with).

The first thing we'll be discussing is how to apply formatting to text. Bold, italics or emphasis, and underline.

To make text bold, we'll use the <strong></strong> tags. If we want some text to be bold, we simply need to put it within these tags. For example, <strong>bold text </strong>, would display as bold text.

In HTML, and most Web-based programming languages, many items, in this case text, are defined by elements which contain either opened or closed tags. A closed tag is one that has a / within it. So, in the previous example we write an opening strong tag, some text, and then a closing strong tag. As we'll see later, some elements only consist of one closed tag.

For italics, we'll use the <em></em> tags. So, <em>italic text</em> displays as italic text.

For an underline, we use <u></u> tags. <u>underlined text</u> displays as underlined text. However, there's a very important point about underlined text. For the most part, you should stay away from using this element / these tags. Most of the newer Web standards do not allow the use of these tags, typically because underlined text should be used only for hyperlinks (or the appropriate citations). However, we won't go into the discussion of the correct way to show underlined text, at this point.

What if we want some text to be both bold and italic? We would simply place the text within both elements; <strong><em>bold and italic</em></strong>. Note that you should close inner elements before you close outer ones. So, <strong><em>bold and italic</strong></em> would not be correct. So, if you wanted to display the text as bold and italic, you would do: <em>bold <strong>and</strong> italic</em>.

The next thing to cover is paragraphs. To define a block of text as a paragraph, you simply need to place it within <p></p>. So, <p>This is one paragraph.</p> would display as:

This is one paragraph.

Next, we've got the backbone of the Internet, the hyperlink, or anchor. This element has an additional kink, in that it requires a couple of attributes. The element is defined by the <a></a> tags, but doing <a>http://strivinglife.net/</a> just isn't enough. Rather, you have to use a href attribute. <a href="http://strivinglife.net/">http://strivinglife.net/</a>. You can then change the text between the tags to be the clickable text. <a href="http://strivinglife.net/">StrivingLife.net</a> displays as StrivingLife.net.

At this point, we're going to stop, because this is quite enough to make you quite dangerous. There's a number of additional elements that can expand upon these capabilities, but you should first be able to use the above before you go too much deeper.

Practice these elements now by taking some text and copying it into Notepad. Now, make some text bold, some italics, and throw in a couple of links. Save the file to your desktop with a .html extension (but don't close the file in Notepad). You may need surround the file name with double quotes in order to make this happen (otherwise, it may attempt to save as .html.txt). Browse to your desktop and open the file with the browser of your choice.

Now, go back to the file in Notepad and use the paragraph tags to make the appropriate paragraph breaks. Save the file again and refresh, or re-open the file in your browser. Tweak additional text as necessary.

With that, you've got just enough HTML knowledge to be dangerous.

Tags:

Categories: tutorials/guides