ColdFusion in Baltimore Rotating Header Image

CFCentOS7: A Lucee (ColdFusion) and DB2 development virtual machine

CFCentOS7 is a VMWare VirtualBox image (aka, appliance) of a pre-configured Linux system for developers.

Why ColdFusion ? If you have to ask, just give it a try. It’s by far the fastest way to write code and deploy web based, database driven applications.

System configuration:

  • CentOS 7 (minimal, with yum installs, 2GBRAM, 2 core CPU which you can change): This is a version of RHEL – one of the most widely used Linux in business and government.
  • IBM DB2-C Express 11.1: Like above, DB2 is widely used and support is plenty. It can handle big data, NoSQL, and pretty much everything else. This version is free without DB size limits 15TB user limit – but 2 CPU and 16GB RAM limit, which is more than enough for most applications.
  • Lucee 5: This is the free version of the fastest way to develop and deploy web applications. I challenge anybody to develop faster apps, with less code, with more built-in security, and better performance. That equals time, which equals money. Adobe ColdFusion development license is free, but the production license does cost money.

Download CFCentOS7 VirtualBox image. (zip, 5gb compressed, 11gb expanded)

Download VirtualBox


After launching the VM you will get a shell.

  • Login: root|coldfusion – all other passwords are also coldfusion
  • After login: startx
  • After GNOME starts, read the file README on desktop for configuration info.
  • Firefox is installed. Lucee admin, and a sample website are bookmarked.
  • CFEclipse and IBM DataStudio are under Applications>Programming. Both are preconfigured for the SAMPLE database and website.
  • Open the default project for CFEClipse and get tinkering.

1-10-2017 Update: Reduced disk size by removing some unneeded apps, added some development tools, converted to VBox image, and added VBox tools.

If you want a portable Lucee with MySQL, that’s here.

And here’s another Linux Lucee VM (~700MB) for VirtualBox



ColdFusion (CFML) language gaining in popularity

According to TIOBE Index for July 2016, ColdFusion has moved up from #102 to #66. The list contains all languages, not just web languages, so being #66 is not too shabby but still way behind PHP and .NET. Even T-SQL is more popular than CFML on this list. But still, does this mean CFML is making a comeback?

My take is, YES!, and this is not the only indicator out there. One of the obvious indicators are the free CFML servers Railo, which is now Lucee, that have been very successful and have contributed to the rise in popularity of CFML. Licensing costs were the main culprit of ColdFusion’s decline and it’s no longer an issue.

But another indirect contributor to CFML’s re-emergence is perhaps the ever rising popularity of Agile and DevOps. The original concept and claim to fame of ColdFusion was that it was a faster way to develop web applications because of it’s simpler language and the bundled tools that made it easier to deploy. And you do not need to go through a complex systems design to develop and deploy ColdFusion apps.

Scheduled and encrypted backup of many files to Google Drive using 7zip, command line, and task scheduler, on Windows

Do you want to backup all or select documents to Google Drive, automatically, and optionally on a schedule? I use this for all my documents, including my CF websites.

This simple command line batch script will first compress and encrypt your files into a single archive file (backup.7z), then automatically upload it to Google Drive – on your schedule. I’m writing this for beginners so skip to the scripts if you know all this.


  1. Google Drive has a 15GB limit so your final compressed archive file cannot exceed that. But, 7zip will compress your files by a lot.
  2. This is for making a single file archive of all your files in case of disaster. You won’t be able to update a file at a time then upload those individually with this.
  3. If you have very large archive file and very slow internet (gasp!) it will take a long time to upload the archive. If you do not have broadband internet, this is not for you.
  4. You cannot backup your entire system with this, since most Windows systems are more than 15GB.

Enough talk, let’s get started:

  1. Download and install Google drive , start the program, and login to your account.
  2. Download and install 7zip, a free utility that will compress and encrypt your files.
  3. Create 3 files in your “My Documents” folder named as below and with the following content. You can edit as you see fit if you know how. I’ll explain what the content means.


This file contains the excludes list from your backup. These can be file(s) or folder(s). You can use wildcards, e.g. “*Pictures*” will exclude “My Pictures”. Each line is an exclude.



This file contains the includes list from your backup. It can be wildcard like above or full path. If there is a space in the path, you must put it in quotes, e.g. “G:\backup\Users\your user name”.



This is the batch file that will create the archive. As mentioned above, Google Drive and 7zip must be installed, and you must have logged into your Google Drive account from the PC that you are backing up. (You must change yourusername in the script to your actual username through the script.)

What this does:

  1. It stops Google Drive so that while creating the archive, there is no synchronization.
  2. It deletes the old backup archive if it exists.
  3. It creates the archive, to your specification from above, and with the password you specify in the script (below). It encrypts the file with AES-256 and encrypts file names.
  4. It restarts Google Drive, which then will sync the newly created archive file with the cloud.
REM KILL GoogleDrive so it doesn't copy when creating archive
Taskkill /IM googledrivesync.exe /F

REM del existing and create new archive
IF EXIST C:\Users\yourusername\Google Drive\backup.7z (
del "C:\Users\yourusername\Google Drive\backup.7z"
"C:\Program Files\7-Zip\7z.exe" a -t7z -mhe=on -mx=9 -pYOUR_STRONG_PASSWORD "C:\Users\yourusername\Google Drive\backup.7z"  -i@C:\Users\yourusername\Documents\backupinclude.txt -xr@C:\Users\yourusername\Documents\backupexclude.txt

REM start GoogleDrive if and when the file is created
IF EXIST "C:\Users\yourusername\Google Drive\backup.7z" (
start "" "C:\Program Files (x86)\Google\Drive\googledrivesync.exe"

The file names and locations must be the same as above except “yourusername” should be your actual username. Otherwise, you need to update it  to reflect the file locations.

The final step is to add a task to the Task Scheduler library to run backuptoGoogleDrive.cmd on a schedule that you define. Here is a very good howto on that. All you have to do is point your task trigger to the backuptoGoogleDrive.cmd file and you are set!

This is meant as a guide to use Google Drive as a backup. Why do I use 7 zip instead of the Windows Backup or some other tool? For me, it is simpler than Windows Backup command line (wbadmin) or other tools and I can restore my files anywhere, not just on Windows . You can use wbadmin or any other archive/backup tool, use whatever is easiest for you.


Update: If you want to only update your archive with the changed files (i.e. incremental backup) then change your compress option to below. This will speed up the backup process immensely and use less CPU power.

IF EXIST "C:\Users\yourusername\Google Drive\backup.7z" (
"C:\Program Files\7-Zip\7z.exe" u -t7z -mhe=on -mx=5 -slp -pYourPassword "C:\Users\yourusername\Google Drive\backup.7z"  -i@C:\Users\yourusername\Documents\backupinclude.txt -xr@C:\Users\yourusername\Documents\backupexclude.txt
REM del "C:\Users\yourusername\Google Drive\backup.*"
) ELSE (
"C:\Program Files\7-Zip\7z.exe" a -t7z -mhe=on -mx=5 -slp -pYourPassword! "C:\Users\yourusername\Google Drive\backup.7z"  -i@C:\Users\yourusername\Documents\backupinclude.txt -xr@C:\Users\yourusername\Documents\backupexclude.txt

Flash error when installing QuickBooks Pro 11 on Windows 7

Recently, when installing an older version QuickBooks Pro 2011 on Windows, it would not get past the Adobe Flash installation part. If this happens to you, you may see errors like this:

“Installing File FP_AX_MSI_INSTALLER.exe.”

“Failed to install. For troubleshooting tips, please see

“Error 1722”

  • Try pressing Alt+Tab first to see if there is an error window, and click OK in that window, and if that does not work follow the below steps.


  1. Copy the entire contents of your QuickBooks DVD to a temporary location on your hard drive, e.g. c:\temp
  2. In the QB copy on your hard drive (you created it in step 1) , find the Third Party folder and find Adobe Flash folder. There will be a single file in this folder named install_flash_player_10_active_x.exe Rename this file to install_flash_player_10_active_x.bak
  3. Download the latest Flash ActiveX standalone installer from Adobe (here) and copy it to the same folder in step 2, and rename it install_flash_player_10_active_x.exe You need to download the Internet Explorer “.exe” version for Windows which will have “active_x” in the file name, or just download this version if it still exists:
  4. Finally, run setup from the new copy you created on your hard drive (the one you created in step 1, not DVD) and you should get past the Flash part.

Why is this happening? I think Windows 7 and 8  is blocking older install of Flash 10 for security reasons and the QuickBooks installer is not programmed to handle this error, so it just fails.


Factual and ColdFusion

Here is how to use the Java driver from Factual in ColdFusion. I wish Factual would support CF. So I’m posting it for anyone to use, and turns out it’s really simple.


  1. You can either obtain the Java driver from Factual Github, and get all the dependencies from Maven, or you can download this complete jar package FactualJarLib. Unzip and place all the jar files in your ColdFusion lib folder, and restart the server to enable the driver. You can also dynamically load the jar files (google it).
  2. To use the driver, use the following code. You can substitute the table names and add other vars, just append them to the query string (factual_URL) as below.
  3. [coldfusion]
    // set query vars
    limit =20;
    place_type = 150;
    locality = "Baltimore";
    region = "MD";
    offset = 0;
    // create query string
    factual_url = ‘query.limit(#limit#).field("category_ids").includes(#place_type#).field("locality").includes("#locality#").field("region").includes("#region#").offset("#offset#")’;
    /// init driver, add keys
    factual = createObject("Java","com.factual.driver.Factual").init("yourApiKey", "yourSecret");
    // init Query object
    query = createObject("Java","com.factual.driver.Query").init();
    // evaluate built query string
    // submit string to query object
    q=factual.fetch("places", q);

    <cfdump var="#q#">

  4. That’s it!!!



Railux 4 (cfubuntu)

This is old, use this instead:

This version of the Railo CFML ColdFusion Virtual Machine Appliance has MySQL database and Ubuntu desktop. It has (almost) everything for Railo/ColdFusion development, including;


All the usernames (except MySQL which is root) and passwords are coldfusion 

Extract the files using WinRar, double click the VMX file (you’ll need the free VMWare Player), and choose “I copied it” when it first starts.

  • Log in to Windows (Xcfe) with password coldfusion
  • All the admin (Tomcat manager, Railo manager) URLs are bookmarked in Firefox (once you start Firefox in the VM, you will see them bookmarked in Firefox).
  • CFEclipse (under Start>Development Tools) defaults to an Apache virtual host named cfubuntu. This host is bookmarked in Firefox, as is the default host. 
  • The cfubuntu virtual host can be viewed from other computers only if you add it to your hosts file. e.g.         cfubuntu
  • If you need to add more virtual hosts, look at the Apache and Tomcat conf files. (in /etc/tomcat7 or /etc/apache2 — e.g. files are server.xml, web.xml, http.conf, etc) — since this topic is beyond the scope of this article, I won’t elaborate – but you can ask below.

This version is not locked down or hardened, it’s not for production.


Edit: Railo admin is not bookmarked. Browse to http://localhost:8080/railo —- password is coldfusion

Download here: (3 GB)







Railux 3.3 – A ColdFusion Application Server VM Appliance

update: this version is old, newer one is here and it has MySQL and Eclipse.

update:  fixed password issue,  working on enhancements (Eclipse, mySQL, etc)

With the release of Railo 3.3,  we now have Railux 3.3! This version is built on Damn Smal Linux (DSL) and is a base version with almost no configuration other than Railo with Tomcat.  This is so that you can customize it any way you wish.  It’s fast and light-weigth. You can also use this as a plain Tomcat server.


Railux: A Railo ColdFusion CFML Virtual Appliance

This is the older version of Railux, but has Apache and MySQL. For the ligthweight new Railux with Railo 3.3, go to

Railo Appliance, Railux, is an Apache/Tomcat/Railo stack on Ubuntu Linux and Railo 3.2 on Tomcat. Based on the BitNami Apache-Tomcat Appliance, it’s a fully functioning Railo ColdFusion Server Appliance that could be used for production or development.

Version information
– Railo 3.2 (CF 9.0 compatible)
– Apache 2.2.16
– Tomcat 6.0.29
– MySQL 5.1.50
– Java 1.6.0_22
– Samba server (latest via apt-get)
– UFW Firewall (latest via apt-get)
– Nano editor (latest via apt-get)

Usernames, passwords, and other information
– For Linux: bitnami:bitnami
– For Tomcat: manager:bitnami
– For Railo: istanbul
– For Samba: coldfusion:istanbul
– For mySQL: coldfusion:istanbul
– Hostname: Railux
– IP Address: DHCP Configured
– Railo Homepage: http://railux (you will need to add the IP and name to your host file)
– Tomcat Manager URL: http://railux/manager
– Installation folder: /opt/bitnami

How to get it
Download image (717MB)
– Extract the contents folder to your drive

How to use it
– Double click bitnami-tomcatstack-6.0.32-0-ubuntu-10.10.vmx in the extracted folder to start the appliance (you must have VMWare or VMWare Player, get the player free here)
– There is no need to login to the console to use Railo. After start up, you can either go to the IP address displayed on the console window or go to http://railux to view the Railo homepage. From there you can access the Railo admin
– The Site Studio website is provided as an example under http://railux/tss
– To upload your website, go to the samba share on \railuxcoldfusion
– You can delete the TSS folder if you like but do not delete anything else
– To make the default page your home page (e.g., you must add a Virtual Host to Apache , then  create a domain in your hosts file or on your network’s DNS server and point it to railux so you can access it
– The conf file is in /opt/bitnami/apache2/conf/httpd.conf
– Restart Apache when done by running the control script by sudo /opt/bitnami/ restart apache

Future Features
– Add Mura and other CF apps
– Improve management
– Reduce image size
– Add other VM formats

If you have questions or feedback, contact me

Tracking Flash movie views with JavaScript and ActionScript

So, you have an embedded Flash video on your page that has a “play” button,  and you want to silently track the number of  “plays”, and do it with the same web statistics program you use for all your other pages? Well, here’s how you do it in ActionScript 3 and JavaScript.

1- Add the following ActionScript into your Flash file’s 2nd frame, or a frame in the timeline where you know it began playing or has played, such as the last frame.

import flash.external.ExternalInterface;“frameNone”);

This step calls the external Javascript function.

2- Create a blank page called flashmovie.html in the same directory as the page with the Flash movie. This is the page you will track as the number of “plays” since it will only load when users play the video. You can also add your own code to this page to call external web site statistics programs such as Hitslink, that you would normally do with any other page.

3- Add this JavaScript inside the <head></head> tags of the page where the Flash is embedded.

<script type=”text/javascript”>

//for flash intro
function frameNone(){
<iframe src=”” id=”flashFrame” style=”visibility:hidden”></iframe>
This step loads the blank page from step 2 into an invisible IFRAME on the same page as the Flash movie.
Now you have page that was hit when the movie got played and it’s logged with your webserver.
That’s all folks!

Creating dynamic thematic drill down maps ONLY with ColdFusion

Here is a step-by-step on how to create data driven thematic (choropleth) maps in ColdFusion. No other software needed. Who needs BI software?

1- Download the (shape file) and usa.xml (webcharts project -XML file)

2- Place into your X:ColdFusionWEB-INFcfusionlibmapsCountries directory

3- Edit the usa.xml file to  point to the file (line 6)

4- Get some data from somewhere. has data on Medicaid. I used the 2008 total $ paid.

And here’s the code..I used some code from Ray Camden’s thanks Ray.

[coldfusion]<!—set values and colors —>
minamount = minmax.minamount;
maxamount = minmax.maxamount;
lo_amount = minamount;
tenth = (maxamount-minamount)/10;
next_Amount = lo_amount+tenth;
row = 1;
<cfloop list=”#bluelist#” index=”value”>
row = row+1;
lo_amount = next_Amount;
tenth = (maxamount-minamount)/10;
next_Amount = next_Amount+tenth;

<!— Get base server url —>
<cfif len(CGI.HTTPS)>
<cfset baseURL = “https://”& CGI.HTTP_HOST &”/cfusion/”>
<cfset baseURL = “http://”& CGI.HTTP_HOST &”/cfusion/”>
<!— Extract chart style from the WCP file —>
<cffile action=”read” file=”#ExpandPath(‘rusa.wcp’)#” variable=”xmlResult”>
<cfset xmlResult = XmlParse(
REReplace(xmlResult, “^[^<]*”, “”, “all” )
) />
<cfset wcp = XMLParse(xmlResult)>
<cfset chartStyle = ToString(>
<!— Create chart data <cfdump var=”#usatotals#”>—>

<cfsavecontent variable=”chartModel”>
<?xml version=”1.0″ encoding=”UTF-8″?>
<map name=”USA”>
<cfoutput query=”usatotals”>
<!— set bg color —>
<cfloop query=”colorQ”>
<cfif usatotals.totalsum GTE lo_value AND usatotals.totalsum LTE hi_value>
<cfset backcolor = color>
<item name=”#st_desc#” backColor=”#backColor#” popup=”$(name)n$$(value)” value=”#NumberFormat(totalsum,”___.__,”)#”/> </cfoutput>
<!— Initialize chart settings —>
oMyWebChart = createObject(“Java”,””);
oMyApp = getPageContext().getServletContext();
oSvr = oMyWebChart.getDefaultInstance(oMyApp);
oMyChart2 = oSvr.newImageSpec();
oMyChart2.width = 720;
oMyChart2.height= 465;
oMyChart2.type = “png”; = “#chartStyle#”;
oMyChart2.model = “#chartModel#”;
<!— Create html tag set —>
<cfsavecontent variable=”chartImgTag”>
<cfoutput>#oSvr.getImageTag(oMyChart2, baseURL& “CFIDE/GraphData.cfm?graphCache=wc50&graphID=”)#</cfoutput>
<!— Good old Webcharts loves to add an extra /Images/ to the URL —>
<cfset chartImgTag = replace(chartImgTag, baseURL &”Images/”, baseURL, “All”)>

<span class=”important”>Medicaid Total Amount Paid –
FY<cfoutput>#url.fy# – #DollarFormat(grandtotals.totalsum)#</cfoutput></span><br />
(click a state to drill down)
<table width=”100%” border=”0″ cellpadding=”0″ cellspacing=”5″>
<td align=”left” valign=”top”><cfoutput>
<table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”2″>
<tr bordercolor=”##000000″>
<td colspan=”2″ class=”style17″>Map legend (in millions)</td>
<td><span class=”style17″>Data unavailable </span></td>
<!— set colors and values —>
<cfloop query=”colorQ”>
<td bgcolor=”#color#”>&nbsp;</td>
<td><span class=”style17″>#DollarFormat(lo_value/1000000)# – #DollarFormat(hi_value/1000000)#</span></td>