Errors with CFIMAGE and CF8 image functions

ColdFusion 15 Comments »
We are running coldfusion 8 enterprise in multi-instance mode on JRUN, and we are trying to do auto image processing for uploads to convert to a standard JPG format in thumbnail and large sizes... pretty standard stuff IMHO. The problem is that CF8's new image functions completely barf on certain types of images, including greyscale gifs, jpegs with funny colour profiles or jpegs with non-72 dpi. This would manifest in either jrun bombs or simple resizes of images taking longer than 5 minutes to process instead of the usual < 5secs. This understandably lead to a loss of confidence from the users of the systems when our fancy new upgrade was so painfully slow. After much frustration we fixed some of the complete bombs happening after reading some of the great tips in this post, but we still had the long processing times to deal with. After some trial and error the way we got around it was as follows:
  1. Use cfimage to read in the uploaded file
  2. Use cfimage to save as PNG. this is the great part! saving as PNG converts the image to 72 dpi and seems to strip the erroneous colour profiles :) and doesnt affect the quality of the image
  3. Use cfimage to read in the new PNG
  4. Do what needs doing
  5. Delete the PNG
  6. Celebrate your fast and cool utility
Using this intemediary convert to PNG step literally took the processing time from 5 mins to 10 secs for the worst case JPG file we could find

5 min Subversion (SVN) Server on windows

Apache , Subversion (SVN) , ColdFusion 2 Comments »
So i've been using subversion for years at my various jobs and have found it indispensable. So i rightly thought, "how come i'm not just using this at home on my small projects and playground apps?"

It was time to fix this scenario and install SVN server on my home server (which is fine as it has a static internet IP and backup, so it's quite usable).

By far the simplest and most usable option i found for installing SVN server on windows is VisualSVN Server.

It was installed, and with its simple GUI, users created in groups and assigned to new repositories in under 5mins! It even has a secure apache rolled in for websvn that you can easily configure to a non-standard port.

There is really no excuse anymore for not giving yourself all the luxuries that SVN affords you.

eXtreme Programming

Mac , ColdFusion 4 Comments »

eXtreme Programming

Free server monitoring with alerts!

Apache , Hosting , ColdFusion 1 Comment »
So i am googling around looking for a free server monitoring solution to play with and come across this nifty (yet ugly) site: http://www.servermojo.com

Looks aside, it's got some pretty cool functionality such as: free!, can add unlimited sites, has a few monitoring methods (i chose http+keyword), has basic charts, will do email alerts, and even twitter alerts (which translates to free sms alerts via twitter!)

So you could potentially setup a few different pages like ping_apache.htm and ping_coldfusion.cfm both with just a single keyword in the file and then you could easily see if you had an alert on the ping_coldfusion and not the ping_apache that it was a jrun problem and not a server level.

Worth checking out at least, i'll post if i see any negative performance with it

Apache 2.2.x openSSL CSRs on Windows

Apache 3 Comments »

When i went searching for info on generating CSRs (certificate signing requests) to get an SSL cert to use in apache+openSSL i was met with a sea of confusion, i think mostly surrounding the fact there wasn't a pre-compiled offical win32 binary of apache installer with openSSL baked in, requiring a lot of manual fudging. After a bit of research the process is now really quite trivial: Download the apache 2.2.9 with openSSL (mod_ssl) from apache Now the regular command you'd use to generate a non-passphrase private key and CSR will not work the same in windows as it's looking for a config in a unix path /usr/ so you need to specify the full path to the openssl.cnf file (found in the apache conf dir) Open up a cmd window and cd to your apache bin folder then enter the following (changing the url and company details):

openssl req -new -nodes -keyout www_mysite_com_au.key -out www_mysite_com_au.csr -subj "/C=AU/ST=New South Wales/L=Sydney/O=My Company/OU=IT/CN=www.mysite.com.au" -config "C:/Program Files/Apache Software Foundation/Apache2.2/conf/openssl.cnf"


This should leave two new files www_mysite_com_au.key and www_mysite_com_au.csr which you copy to your conf folder for referencing in your ssl configs as noted in the docs and ssl sample conf To get your key signed, go to a certificate issuer and cut and paste the contents of the .csr file Too easy!

Powered by Mango Blog. Design and Icons by N.Design Studio
RSS Feeds