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.
- Install Tomcat 8 via Homebrew
- Configure Tomcat Manager app
- Download Lucee WAR
- Redeploy Lucee as ROOT web application
- Set credentials for Lucee Server and Web Admins
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()#">
I simply have a Region object that has to methods:
- public string function getRegion()
- 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.
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:
- Prompt the user for the value to find
- Prompt the user for the value to replace the “find” value with
- Prompt the user for the SVN commit message
- 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
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
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.
In migrating our application’s caching service to use ColdFusion’s Ehcache integration I needed to a way to get all of the caching regions stored in Ehcache. This was easily accomplished using the Ehcache API:
- Get the CacheManager instance
- Get the cache names
- Sort the cache names
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:
- Parse HTML to obtain images on page
- Download each image
- Check that the image is large enough (to avoid little icon graphics/etc)
- 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