[image]
Ph: 49060600

Feb 15, 2012

Where do you host your ColdFusion sites?

Lots of people ask me where I host my ColdFusion sites or recommendations for quality hosting.  At work we use a large ( but expensive provider ) which is mostly out of individuals budgets.  For my side projects I have switched to Amazon EC2 as my primary VPS solution.  In fact the Windows and Linux micro instances are now free fro a year and you can run mySQL and ColdFusion on one of these servers.  If you really want it to be free run Railo ( it's also got less over head ).  I'd also recommend Rackspace as there cloud offering is really fast and they have great support.  I'm also a fan of a bargain and have quite a few smaller VPS's that I pickup on sale from LowEndBox.com there often worth a try to get your Linux skills updated.  As for shared hosting I don't have any preference but I do have an account at HostingAToZ which is very cheap ( $12.50 a year ) and hosts quite a few of the demos on this blog.  Any one any have suggestions?

We used to have quite a few servers in Co-location but we have stopped that as really who wants to also manage and support hardware.

Jan 30, 2012

Client Varibles error in logs with registry - ColdFusion

Recently I have been spending some time diagnosing a CPU spike issue on one of our heavy load servers. The server runs lot's of small sites with a mixed code base some differnt developers over the years. Some of the code dates ~10 years.

The server is ColdFusion 9 64bit on Windows server 2008r2. While searching in the logs for any information I came across entries such as:








I immediately thought this was due to client variables which Mark Mandel confirmed via skype. I checked in CFADMIN ( "Server Settings > Client Variables" ) and confirmed that "Select Default Storage Mechanism for Client Sessions" was set to none. I thought this was enough to stop all use of client vars. It's not.

I ran a file search over the entire code base for:

cfset this.clientManagement or cfset application.clientManagement or clientManagement

I found one Application.cfc had:

I knew that application was not using client vars so I set this to false and the errors went away. 

The log file to look for is: coldfusion-out.log on a default install ( single instance ) at [drive]:\ColdFusion9\runtime\logs
[image]
01/30 14:26:04 Information [jrpp-32] - Unable to set value HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\ColdFusion\CurrentVersion\Clients\8245871-49060600\timecreated: Windows error number 0 occurred.The handle is invalid. 01/30 14:26:04 Information [jrpp-32] - Unable to set value HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\ColdFusion\CurrentVersion\Clients\8245871-49060600\lastvisit: Windows error number 0 occurred.The handle is invalid. 01/30 14:26:04 Information [jrpp-32] - Unable to set value HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\ColdFusion\CurrentVersion\Clients\8245871-49060600\urltoken: Windows error number 0 occurred.The handle is invalid. 01/30 14:26:04 Information [jrpp-32] - Unable to set value HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\ColdFusion\CurrentVersion\Clients\8245866-79360187\cfid: Windows error number 0 occurred.The handle is invalid. 01/30 14:26:04 Information [jrpp-32] - Unable to set value HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\ColdFusion\CurrentVersion\Clients\8245866-79360187\cftoken: Windows error number 0 occurred.The handle is invalid. 01/30 14:26:04 Information [jrpp-32] - Unable to set value HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\ColdFusion\CurrentVersion\Clients\8245866-79360187\hitcount: Windows error number 0 occurred.The handle is invalid.

Jan 12, 2012

Railo 3 Beginners Guide

I've recently been reading through Railo 3 Beginners Guide. While I have been working with CFML and Railo for a long time it's often still worth going back to basics and revisiting from the bottom up. Railo has come along way I was using Railo year back where I had to manually compile the connectors between Resin and apache I even remeber having to compile them and send then to a few people. It was alot of fun and the result was worth it. 1 it ran a few sites ( one which generated alot of traffic for several consistent months ) and 2 gave me the opportunity to delve deeper into my application server. This book now walks you through installing Railo ( which is now very easy ) and getting started on working with cfml. I have just put on a new developer who has never seen cfml and is already able to work solo I thin it's a great strength of the language and a decent programmer/developers should in my opinion be language agnostic but when just getting started books such as this are a great place to start. One quick example is the a nice hidden tag that is amazingly easy to use. Showing someone new to Railo that tag alone will impress. Anyway if ( like ) you are expanding your dev team and are considering hiring devs new to cfml ( and I recommend this ) I'd consider a copy of this book for your collection. http://www.packtpub.com/railo-3-beginners-guide-to-develop-deploy-complex-applications-online/book
[image]

Jan 4, 2012

onError cfmail errors to yourself in ColdFusion in cfscript

I'm sure lots of people do the same thing as I do. In onError I eMail myself the errors ( and some other scopes ) so when errors occur on my application I can address them. Moving to script means I can have my entire Application.cfc in script how ever this introduced a small issue. Basically what I do is into the body of an email. With script it's a little more involved but still works eg: You'll notice that I added output = true to the method annotation. I don't think that should be needed infact it works as expected in Railo. It's strange and not consistent with the tag implementation. I think its a bug in ACF. Before adding the annotation I was receiving my emails as expected but the body was always empty. Update Upon further investigation the code quoted above does not actually work. I think the actually issue is in mail.addPart(); However this code works just fine: [ http://pastebin.com/embed_iframe.php?i=VghYrygg ]

Dec 17, 2011

OpenBD on Google appengine - ColdFusion / CFML

I've been tidying up my blog and fixing some of the lost code samples and was moving around some of my code that was on Google App Engine. After workings out how to use OpenBD desktop to deploy new OpenBD CFML apps to GAE I realized I broke my demos. After a bit of searching I found this post. http://groups.google.com/group/openbd/browse_thread/thread/e94b47a51e5d8a86?pli=1 And this is the Bug: http://code.google.com/p/googleappengine/issues/detail?id=5898 If your interested in OpenBD on GAE then vote for it.
[image]

Dec 14, 2011

Recover a datasource password in ColdFusion

I forgot a password to a mySQL datasource on my personal VPS. Not the end of the world I can log in to mySQL and reset it if I need but I knew these passwords were in new-datasource.xml in an encrypted format and was curious to see if I could decrypt that password. Turns out you can. I used this post as a staring point http://paulalkema.com/post.cfm/pull-a-list-of-all-coldfusion-datasources-along-with-username-and-passwords and while I was at it built this small app in case I need it in the future. App: http://demo.kukiel.net/jquery/pass/

Dec 4, 2011

Rail ORM tomcat hibernate jvm settings permspace error

I've just started working on a small project using ORM and Railo.  I'm running Ubuntu linux and the tomcat 7 installers with not chnage to jvm settings.

The first HQL query I ran a recieved an permSpace memory error.  Not a huge deal but if your not used to the locations of the jvm settings it can be a bit of a challenge.  PermSize was set to 64mb on the standard install which was a little to low.

The locations of the files for a standard install are:

/opt/railo/tomcat/bin

in:  setenv.sh

I changed my settings to look like this:

-Xms128m -Xmx512m -XX:+CMSIncrementalMode -XX:+ExplicitGCInvokesConcurrent -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384m -XX:PermSize=384m -XX:+UseConcMarkSweepGC

Part of this was from Kai's example's which can be found here:  http://t.co/aShOtpM

I have less RAM to work with so my settings are smaller.

my setenv.sh file looks like:

[image]
Railo can then re restarted by:

/etc/init.d/railo_ctl restart

My application continued to run as expected.

Nov 17, 2011

The future of Flex from the mouth of Adobe and my thoughts - cfObjective ColdFusion Flex

So I attended CfObjective ANZ today.  It was a good day great to catch up with alot of the people from the community that I haven't seen for a while and and those that I see regularly at the Melbourne ColdFusion and Flex usergroup.  The venue was really quite nice and the food was some of the best I have had at a conference.

One of the main factors of attending this year was to find out from Adobe and the community how we are supposed to react to Adobe's messages recently about Flash and Flex.  I think we all feel Adobe PR have done a poor job of communicating the changes and alot of people want to know the real truth.  Part of what was re-iterated was:

Adobe have stopped development of the Mobile Flash player ONLY.

Moving the following projects to the Apache foundation:
Complete, but yet-to-be-released, Spark components, including ViewStack, Accordion, DateField, DateChooser and an enhanced DataGrid. BlazeDS, the server-based Java remoting and web messaging technology that enables developers to easily connect to back-end distributed data and push data in real-time to Flex applications. Falcon, the next-generation MXML and ActionScript compiler that is currently under development (this will be contributed when complete in 2012) Falcon JS, an experimental cross-compiler from MXML and ActionScript to HTML and JavaScript. Flex testing tools, as used previously by Adobe, so as to ensure successful continued development of Flex with high quality
 Ok that's good so far.  I don't do any development targeted to the mobile flash player, matter of fact I don't know anyone who has or did.  What I do know is I use Flex and Flex to iOS and Android.  While the Framework is open source and Adobe are committed to releasing 4.6 ( which I eagerly await ) I asked about the future of FlashBuilder ( FlexBuilder ) in regards to future releases on Flex ( 4.7 ).  What I wanted to hear was that Adobe will continue to evolve this product for future Air and Flexmobile and normal PC based Flex projects.  The straight answer I got was "Yes"

I also asked if the name would change back to FlexBuilder and sadly that was no.  Oh well.

We all work in a rapidly changing environment and have to adapt as technology changes but nobody wants to invest a significant amount of time and resources in a language/framework to what the carpet pulled out from under them so today we did hear some good news.  With the addition of the AS/MXML to HTML and JS compiler to be released we have some promising options to look forward to.

On the ColdFusion front I had nothing to worry about but did hear some nice news that in the next 24 months Adobe has 4 planed releases ( probably 2 ColdFusion versions and 2 CFBuilder updates ) which is a good thing.

One of my favorite sessions of the day was Kai's session on tuning the jvm.  I have alot of servers I look after and it's quite a science and Kai really knows whats going on and helped convert into understandable english what we can do and where to look to extract the best performance possible from our coldfusion servers.

Looking forward to day 2!

[image]

Nov 10, 2011

Should I use Flex FlashBuilder to build iOS apps

So Adobe is no longer supporting a mobile version of the FlashPlayer.  Does this bother me?  No not really websites I work on are pure HTML and there is really nothing I need Flash ( in the browser for ) at the current time especially on mobile devices.  However I do have an iPhone and I did get flash running on the iPhone but that was a "just because case".

So now that Adobe are no longer maintain a Mobile Flash player should i still build Apps for iOS and Android using FlashBuilder?  Well yes why wouldn't I.

I have a need to build a smallish application that is a perfect candidate for FlashBuilder.  I'm familiar with Flex and need to get the app to market pretty rapidly I still see this as the best option.

A few people I have spoken to are on the same wave length as me.  Building AIR and Mobile app with FlashBuilder is really and great option specially when it take so much longer to build "natively".  Sure if I were building a game but I'm not.

In any case I'd like to hear some feed back as to weather people are still going along the FlashBuilder -> iOS path.

[image]

Sep 14, 2011

Windows 8 and ColdFusion 9

I downloaded the developers edition of Windows 8 and installed it in Virtual box. Yes it works fine in Virtual box, I assigned 20g HDD and 1024ram. It booted and and ran quite well. I then installed ColdFusion 9 standalone, IIS 8 and was attpemtping to install CF 9.01 updated so I could see if CF would hook into IIS 8. No such luck the 9.01 updater stops with this:

ZeroGur: Windows DLL failed to load at ZeroGa4.b(DashoA10*..) at ZeroGa4.b(DashoA10*..) at com.zerog.ia.installer.LifeCycleManager.b(DashoA10*..) at com.zerog.ia.installer.LifeCycleManager.a(DashoA10*..) at com.zerog.ia.installer.Main.main(DashoA10*..) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.zerog.lax.LAX.launch(DashoA10*..) at com.zerog.lax.LAX.main(DashoA10*..)

 Anyway that's where I got to.

 Windows 8 looks interesting and boots and installs quickly. The main piece of software the company I work for runs on it so that's another plus. I'd be interested to sort through all the new additions.

[image]
[image]
[image]

Sep 9, 2011

ColdFusion and Flex error any help?

I'm really not sure what has cause this but on our dev box we started seeing this error. Now CF is running and works, but somehow flashremoting isnt. No one claims to have messed with the server so I can't understand why it's happening. Ideas?

Sep 6, 2011

jQuery ColdFusion and cfdump into a div

I was making a small demo for someone with jQuery and populating a div when I thought it would be interesting to see if you could cfdump into a div. With jQuery and ColdFusion anything is possible. Here is the code and a working demo [ http://demo.kukiel.net/jquery/jcfdump ] Index.html script cfc cfc

Aug 27, 2011

Free Text to Speech with ColdFusion and jQuery

A few weeks ago I decided to build a small but fun website http://www.freetext2speech.com
The idea is simple, type some text into a box and convert it to speech. I used the FreeTTS java library and ColdFusion 9. I got started with Rays post a few years ago and did some additional conversions to swap to mp3 so I could use a small Flash based MP3 player to play back the sound. The site also has clean URL's to send a message to someone and all the javascript is of course jQuery. All in all a fun project that allowed me to use java, ColdFusion, ffmpeg, jQuery and some simple url rewrite to make a small clean site in around 150 lines of code including Application.cfc

As this is on a small VPS I decided to also run this on java 7 so far it have been up for about 2 weeks without issue and memory usage is very low.

[image]

Aug 26, 2011

.net C# Flex datagrids and Excel

A few people have contacted me via live chat and also via comments regarding Flex Data grid to excel post that they would like to see how to do the same thing with .NET

I made a quick demo where I pull a RSS feed with .NET, parse out a few columns and return the result to a small Flex app. Flex will handle the .NET objects as generic objects and you can cast the array to an arrayCollection and simply use this as the data provider for a datagrid.

I then used almost the same code to build up a post string as I was with ColdFusion and PHP however the spark grid is a little bit different and required some small changed.

With .NET we have access to Excel libraries which I used to generate real Excel documents where you can set styles and sheet names easily.

The app does a simple post back to a .NET page and generates a excel document on the fly and streams it back to the user.

There are many ways to do the same thing here is just one way. Currently in our apps we typically write the file out to disk and provide a download link as the front end to our .NET applications are pure html.

View source is enabled on the Flex widget at the bottom of the demo.

Webservice:

Direct Link.

Create excel:

Direct Link.

Demo App:

Aug 18, 2011

How to change the jvm arguments in Railo Tomcat package installers

The new Railo installers are fantastic Jordan has done a great job.

I have a small VPS running demos for this blog it's running Railo. It's mostly for demos but also has a few small hobby sites.

I really don't need to allocate 512 to Railo I wanted to drop it to 256mb ram ( the VPS in Windows server 2008 r2 with only 512 ram which also runs .NET 4 and SQL Server Express ).

I search for a config file but there was none.

So here is how to change your jvm args and lower or raise the amount of ram you allocate to tomcat for Railo.

Click Start, Navagate to "Railo", click "Railo-Tomcat Servcice Control"

This will allow you to edit the options on the service.

Select the java tab

Then add jvm args and adjust the memory.

Screen shots:

[image]

[image]



You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser