ColdFusion in Baltimore Rotating Header Image

Uncategorized

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.

Caveats:

  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.

backupexclude.txt

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.

backupinclude.txt

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”.

backuptoGoogleDrive.cmd

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.

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.

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 http://www.adobe.com/go/tn_19166

“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: https://fpdownload.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_20_active_x.exe
  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. <cfscript>
    // 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
    q=evaluate(factual_url);
    // submit string to query object
    q=factual.fetch("places", q);
    </cfscript>
    
    <cfdump var="#q#">
    
  4. That’s it!!!

 

 

Railux 4 (cfubuntu)

This is old, use this instead: http://www.thesitestudio.com/blog/cfcentos7-lucee-coldfusion-and-db2-development-virtual-machine/

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;

Instructions:

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.    192.168.1.2         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:

http://www.thesitestudio.com/distro/cfubuntu.rar (3 GB)

Screenshots

Cfubuntu2

Cfubuntu5

Cfubuntu4

Cfubuntu3

 

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.

(more…)