Showing posts with label ColdFusion 10. Show all posts
Showing posts with label ColdFusion 10. Show all posts

Sunday 31 March 2013

restSetResponse() requires the method to be returntype void. What?

G'day:
I have to say I didn't even know the restSetResponse() function even existed until I read about it on Stackoverflow this afternoon. The Stackoverflow question drew my attention to this snippet in the docs:

You must set the returntype attribute of the function to void when a custom response is returned using the function restSetResponse.

Wednesday 13 March 2013

Here's a Question

G'day:
I just saw a status update on Twitter of someone mentioning a client of theirs was moving to Railo after being impressed with Railo 4, and underwhelmed by ColdFusion 10. I have to say I think their judgement is off a bit there (ie: I think CF10 is more impressive than Railo 4... that said they're both good products, and I don't mean to take anything away from Railo when I say that), but fair enough: I'm not privy to their requirements and what's important to them so I can't really comment intelligently on the basis for their decision.

Wednesday 6 March 2013

ColdFusion 10 support for Windows 2012 and Windows 8 already out the door?

G'day:
Did I miss something?

Update:
No I didn't, but I just got in about an hour before Rakshith made the announcement. So that clears that one up then. You can ignore the rest of this article now!


On the Adobe ColdFusion forums, there's a comment from vamsee_k:
Installers for Windows 8 and Windows 2012 are already on ColdFusion 10 product downloads page and Adobe store.

Wednesday 30 January 2013

Blatant click bait: ColdFusion 10 Updater 8 is...

G'day
OK, this is a cop-out of an "article", and the title is purposely designed to make you go "huh? Update 8?" (they're only up to update 7 so far).

But I notice there's been a bug raised in the installer for update 8 (update: this bug has since been deleted, so the link is dead), so I guess it's due out any day now. After (hopefully) they iron out the bugs, that is ;-)

Thursday 17 January 2013

Wednesday 9 January 2013

Setting a CFAdmin password

G'day:
I despair. I was going to sit down tonight and be all pseudo-intellectual and watch Au Revoir les Enfants (which I have somehow managed to not yet see) on DVD, and otherwise ignore my computer. And ignore ColdFusion.  But here I am.

I had a Twitter exchange with Russ Michaels and Brad Wood about this current slew of security holes in ColdFusion (there are not one but three, apparently), and I mentioned that I couldn't be arsed looking into it to see what the actual issue was. But just like playing The Game, once the topic came up, it intrigued me more and more, so I decided whilst dinner was cooking "ah, it won't take long to find it, I'll have a look". So off I went.

Friday 14 December 2012

Am I right to think this is stupid?

G'day:
This was brought to my attention via a thread on the Adobe forums in which someone was messing around with "closure" functions being used as callbacks.  One of the statements they made was:

The only thing I observed: a closure does not seem to be a function, because isCustomFuntion (..) returns false. Maybe this should be changed, I dunno.
My reaction to that was "[cough]bullshit", but I decided I better not back my instinct, I'd better make sure I was right first.  But I wasn't right. Typically, the online docs for isCustomFunction() are not much help here:

The IsCustomFunction function returns True for any function that can be called as a custom function, including functions defined using CFScript function declarations and cffunction tags, and functions that are ColdFusion component methods. For CFC methods, first instantiate the component.
On first take - other than having moderately curious wording -  that seems to suggest what is logical: if I create a function with function / cffunction etc, and pass it to isCustomFunction(), I'll get a TRUE result. If what I pass it is anything else (eg: just a string, or a struct or something), I'll get a FALSE.  However this is not the case.

Wednesday 28 November 2012

ColdFusion 10 hosting, anyone?

G'day:
In the course of doing this blog and writing example code for it, or knocking together small applications to help myself and possibly other people, I need a small amount of code to be hosted in a public-facing environment.  Examples of this are the ColdFusion (and ColdFusion Builder) Bugs RSS feeds, my experimental easier-to-use search UI for the Adobe bug tracker, and the Twitter bug notifier thingey. These all run fine on CF9, but there's a few things I want to try which require CF10 (mostly stuff I want to experiment with, like web sockets).

Monday 19 November 2012

Tuesday 13 November 2012

Do we know if ColdFusion 10 update 4 actually does fix these performance/scaling problems?

G'day
I'm still too busy with other stuff to write an article with any meat on it, I'm afraid.  Although that one about rationalising the useage of trailing slashes kept at least me amused for a coupla days. But I'm easily amused.

But here's a formalisation of a thought that's been lodged in my brain for a week or so now.

Saturday 3 November 2012

CFML: Application.cfc-set mappings don't work in onApplicationEnd

G'day:
Well this was not what I was intending to be looking at this evening, but I made the mistake of  looking at StackOverflow and didn't understand what I was reading about mappings and onSessionEnd and ColdFusion 8, so looked into it.


I don't really care about quirks of CF8: the boat's pretty much sailed on any problems anyone finds with that.  However I wanted to make sure it wasn't still happening in CF9 or CF10.

The original problem is that ColdFusion mappings that are set in Application.cfc don't seem to exist by the time onSessionEnd() runs (this is on ColdFusion 8).  Here's some test code and the results:

<cfcomponent output="true">
    
    <cfset this.name = "testMappings">
    <cfset this.sessionManagement = true>
    <cfset this.applicationTimeout    = createTimespan(0,0,0,20)>
    <cfset this.sessionTimeout        = createTimespan(0,0,0,10)>
    
    <cfset this.mappings = structNew()>
    <cfset this.mappings["/test"] = "C:\temp">
    
    <cfset testExpandPath("Pseudoconstructor")>
    
    <cffunction name="onApplicationStart" returnType="boolean" output="true">
        <cfset testExpandPath("onApplicationStart")>
        <cfreturn true>
    </cffunction>

    <cffunction name="onApplicationEnd" returnType="void" output="true">
        <cfargument name="applicationScope" required="true">
        <cfset testExpandPath("onApplicationEnd")>
    </cffunction>
    
    <cffunction name="onRequestStart" returnType="boolean" output="true">
        <cfargument name="thePage" type="string" required="true">
        <cfset testExpandPath("onRequestStart")>
        <cfreturn true>
    </cffunction>

    <cffunction name="onRequest" returnType="void">
        <cfargument name="thePage" type="string" required="true">
        <cfset testExpandPath("onRequest")>
        <cfinclude template="#arguments.thePage#">
    </cffunction>

    <cffunction name="onRequestEnd" returnType="void" output="true">
        <cfargument name="thePage" type="string" required="true">
        <cfset testExpandPath("onRequestEnd")>
    </cffunction>

    <cffunction name="onSessionStart" returnType="void" output="true">
        <cfset testExpandPath("onSessionStart")>
    </cffunction>

    <cffunction name="onSessionEnd" returnType="void" output="true">
        <cfargument name="sessionScope" type="struct" required="true">
        <cfargument name="appScope" type="struct" required="false">
        <cfset testExpandPath("onSessionEnd")>
    </cffunction>


    <cffunction name="testExpandPath" returntype="void" access="public" output="true">
        <cfargument name="message" required="true" type="string">

        <cfset var path  = expandPath("/test")>
        <cfset var fullMessage = "#message#: #path#">
        <cfoutput>#fullMessage#<br /></cfoutput>
        <cflog file="testMappings" text="#fullMessage#">
    </cffunction>

</cfcomponent>

Pseudoconstructor: C:\apps\adobe\ColdFusion\8\instances\CF801\cfusion.ear\cfusion.war\test
onApplicationStart: C:\temp
onSessionStart: C:\temp
onRequestStart: C:\temp
onRequest: C:\temp
test.cfm: C:\temp
onRequestEnd: C:\temp
onSessionEnd: C:\apps\adobe\ColdFusion\8\instances\CF801\cfusion.ear\cfusion.war\test
onApplicationEnd: C:\apps\adobe\ColdFusion\8\instances\CF801\cfusion.ear\cfusion.war\test

Firstly, it's completely legit that the mapping doesn't work in the pseudoconstructor.  See my article on how the settings set in the this scope work if you're not sure why.

However to me it's a bug that they aren't still around in onSessionEnd() and onApplicationEnd().  Someone at Adobe clearly thinks so too, as the behaviour has been modified (partially) in CF9:

Pseudoconstructor: C:\webroots\CF902\test
onApplicationStart: C:\temp
onSessionStart: C:\temp
onRequestStart: C:\temp
onRequest: C:\temp
test.cfm: C:\temp
onRequestEnd: C:\temp
onSessionEnd: C:\temp
onApplicationEnd: C:\webroots\CF902\test

onSessionEnd() has been fixed, but not onApplicationEnd().  You'd think that if someone took the time to fix one of these, they might check the other one too eh?  Apparently not.

It's the same behaviour in ColdFusion 10.  But Railo (4.0.013) works fine: the mapping is still available in onApplicationEnd().

I've raised a bug for this: 3358817.

The work around - such as it is - for this is to set the mappings in CFAdmin: then they work fine.  Not much of a work around, but it might help some people.

Righto.

--
Adam

Oh FFS: Updater 4 hosed my Apache config

G'day
Well here's irony.  I did not follow my own instructions and did not take a back-up of anything before running the new updater. And now my Apache config is hosed, and I am feeling rather dumb.  And rather annoyed at the Adobe ColdFusion team. Or whichever of them are responsible for WSConfig, anyhow.

Friday 2 November 2012

ColdFusion: Problem with session replication with CF10 clustering

G'day:
This is a quick one, just an appendix to yesterday's article about ColdFusion 10 instance clustering. You might recall I was having problems getting sessions working, and that lead on to a discussion about how to get session replication working on a CF10 cluster.

Well I think I have spotted a problem.

Here's the cluster-edit screen on ColdFusion 9 (9.0.2):



And here's the equivalent screen on ColdFusion 10 (10.0... oh, I dunno... I've got updater 2 installed):


Do (maybe) install the new ColdFusion Updater 4

G'day:
This is a follow-up to my earlier article "DON'T Install the new ColdFusion Updater 3".

Update 4 is now out (accompanying blog post from Adobe).

I was gonna say "DO install the new ColdFusion Updater 4", but... do you know what?  Unless there's something really important you need in it, my advice would be to wait for other people to install it first, and see how they go.

Thursday 1 November 2012

Things I'd never looked at before: ColdFusion 10 instance clustering

G'day:

This might well be one of those "stating the obvious" kinda posts, but this one's all about me deciding to have a look at what the "Cluster Manager" option in CFAdmin in ColdFusion 10 is all about.  I've never looked at it before, so I'm pig-ignorant about it.  Perfect for the topic of a blog article then, eh?  Heh.

Thursday 18 October 2012

DON'T Install the new ColdFusion Updater 3

G'day:
Adobe did a good job of promoting the release of the new ColdFusion Updater 3 yesterday, but have not done such a good job of promoting the fact it's got a serious bug in it, which - really - should stop people from thinking of installing it.

The bug is that ColdFusion will erase all scheduled tasks every time it is restarted. So this will be a problem for a lot of people.

Update:
Update 4 is now out, and this fixes all the problems in update 3.  That said... I recommend standing back and waiting for other people to apply it and see how they go before you dive out and install it.  "Once bitten..." etc.


I'm just writing this blog entry in a feeble effort to try to warn people against installing this updater until the fix comes out, to stop people from potentially wasting their time.

If poss, can people pls circulate this info.  I've asked Rakshith @ Adobe to do the same.

Cheers.

--
Adam

Tuesday 16 October 2012

New CF10 patch and new CF10 version number

G'day:

Warning:

Do not install this updater if you use scheduled tasks.  See bug 3348026. Adobe are on the case, and will - no doubt - have a fix shortly.

You might remember me banging on about how Adobe messed up the version numbers of ColdFusion 10 when they started doing "updater" releases, but weren't changing the version number to match what they were calling the releases (so Updater 1 which they were describing as 10.0.1 was still listing as 10.0 in CF Admin and the server scope).  I raised this as bug 3323518.

Well they've just released another updater today (10.0.3), and I'm pleased to say the version number now reflects the same thing as the name of the updater.

Monday 15 October 2012

Probable backwards compat bug in CF10's cachedwithin behaviour

G'day:
I'm following up a post I noticed in the Adobe ColdFusion Forums. I'm gonna write up my findings here, and then summarise / crosspost back to the forums, and perhaps raise a bug depending on what people think about it.

The general gist of the situation is that CF10's query cache seems to be bound to an application, whereas it never used to be. I can see an argument both ways for this, but it's something Adobe seem to have arbitrarily changed without telling us (I have not looked, but the person posting on the forums has, and has drawn a blank).

Update:
Rob Brooks-Bilson has pointed out that there's an Application.cfc setting that controls this:

<cfset this.cache.useinternalquerycache = true>

That about solves this one, except I think TRUE should have been the default. Mileage might vary on that one, I guess.

It's also not been documented in a fashion that's particularly easy to find, I think.  Oh well: at least it's not a bug!

Cheers for that, Rob.

Wednesday 10 October 2012

Why? Just... why?

G'day again.
I'm double-posting today as I spotted this whilst writing up the example code for the previous article.

Thanks to the Maori days of the week having a macron over some of the As, I need to give the ColdFusion compiler a bit of a nudge to explain to it to treat the source code file as UTF-8, not the default of [whatever it is]. It's a bit sh!t that one still needs to do this in the 21st Century, given even NotePad.exe can determine the encoding scheme of a file without being explicitly told, but such is the ways of ColdFusion (view for this bug please: 3342141!).

Sunday 7 October 2012

No I'm NOT the only person in the UK using CF10!

G'day:
OK so that title seems like I'm stating the obvious, but it's a reaction to my earlier article which questioned whether I was. I was questioning this because Rakshith from Adobe had suggested I was, as far as he knew. I didn't believe him, so I decided to try to find out (by running a survey).

Firstly: thanks to everyone who responded.  I got 56 responses which is quite good for the surveys I run.

Secondly: yes, I can confirm that there are people in the UK other than myself using CF10.  Phew.