Lucee on Mac OS X Yosemite Quick Start

Lucee Application Server

After the news of Railo being forked to a new project called Lucee, I wanted to try it out. Why not? I could have started with the express installation, but I wanted to deploy the WAR to my Tomcat 8 installation.

Quick Start:

  1. Install Tomcat 8 via Homebrew
  2. Configure Tomcat Manager app
  3. Download Lucee WAR
  4. Redeploy Lucee as ROOT web application
  5. Set credentials for Lucee Server and Web Admins

Read more

Hash Any ColdFusion Type

In order to generate a unique identifier for caching an object I needed to create a function to accept any data type, and to return a unique hash from that object. I thought this was a pretty useful function, so I thought I would share it here.

The use case for this function is to generatethe id for caching a query. I am using the cacheregion and cacheid attributes for a <cfquery> tag.

<cfquery datasource="#getDatasource()#" name="local.q" cacheregion="#region.getRegion()#" cacheid="#region.getId()#">
  ....
</cfquery>

I simply have a Region object that has to methods:

  1. public string function getRegion()
  2. public string function getId()

In the getId() method I need to generate a unique identifier. To do this, the Region object needed to be able to create a unique ID (or hash) from any variable.

Read more

Find-and-Replace in Multiple SVN Repositories

Subversion

 

This may not be a very useful blog post for everyone, but I needed a solution to be able to do a find-and-replace in all of the files in multiple SVN repositories. I ended up writing a bash shell script to accomplish this.

Here is what I wanted the script to do:

  1. Prompt the user for the value to find
  2. Prompt the user for the value to replace the “find” value with
  3. Prompt the user for the SVN commit message
  4. For each repository, check out and update a working copy on my machine, then do the find and replace, and finally, commit the changes to the SVN server

Read more

ColdFusion 10 Install on OS X Yosemite

Apache 2.4 on OS X Yosemite

If you have just downloaded Adobe ColdFusion 10 on your OS X Yosemite development environment you might be surprised to find out that the installation will cause your Apache 2.4.x server to stop working. The issue is that The ColdFusion 10 installer includes the web server connector utility that does not support Apache 2.4, which ships with OS X Yosemite.

When testing my Apache configuration after the installation was complete, I received the following error:

httpd: Syntax error on line 549 of /private/etc/apache2/httpd.conf: Syntax error on line 2 of /private/etc/apache2/mod_jk.conf: Cannot load /Applications/ColdFusion10/config/wsconfig/1/mod_jk.so into server: dlopen(/Applications/ColdFusion10/config/wsconfig/1/mod_jk.so, 10): Symbol not found: _ap_log_error\n  Referenced from: /Applications/ColdFusion10/config/wsconfig/1/mod_jk.so\n  Expected in: flat namespace\n in /Applications/ColdFusion10/config/wsconfig/1/mod_jk.so

Read more

IIS and HTTPS Binding with Host Header

Well, the title may not be entirely accurate. Honestly, I didn’t know what to title this post — let me explain what I observed and how I was able to get around the issue.

The default behavior in IIS is that you can only bind a SSL certificate to a specific site. And, by default, you cannot specify the host header value for the binding. What this means is that the SSL certificate is now bound to port 443 for all sites using the IP address specified. If you look at the screen shot below, you will notice that the Host name field is grayed out, and we are unable to populate this.

The default behavior for binding an SSL certificate is to only allow the certificate to be bound to a single site, without a host name specified.

The default behavior for binding an SSL certificate is to only allow the certificate to be bound to a single site, without a host name specified.

Read more

PNG Support for PHP on OS X Yosemite

I recently upgraded to OS X Yosemite and ran into a small issue when attempting to create an image resource from a string. Here is what I am attempting to do:

  1. Parse HTML to obtain images on page
  2. Download each image
  3. Check that the image is large enough (to avoid little icon graphics/etc)
  4. Resize the image to a standard height and width

The issue is that after upgrading to OS X Yosemite the PHP build that ships with OS X does not have PNG support enabled. It’s honestly a bit surprising that this was excluded from the build. Here is the error message that I received

Warning (2): imagecreatefromstring(): No PNG support in this PHP build

Read more