RE: Createobject and Shared Hosting Providers
James - I believe this problem was fixed in 7.0.1. If you have Java object creation disabled in a sandbox, instantiation by reflection will also be disabled. -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 29, 2006 11:52 AM To: CF-Talk Subject: Re: Createobject and Shared Hosting Providers Be aware that this does not disable Java object creation, as arbitrary java objects can still be created by the reflection method that Dan demonstrated a few days ago. There is currently no way of preventing java object creation on a CF server. On 11/29/06, Teddy Payne [EMAIL PROTECTED] wrote: I can see why some administrators disable Java loading. -- CFAJAX docs and other useful articles: http://www.bifrost.com.au/blog/ ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261965 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Site Monitoring
And for those who couldn't make it out to MAX, here's a peek at what we're doing for server monitoring in CF8 - http://blogs.sanmathi.org/ashwin/2006/11/08/sneak-peek-scorpio-server-mo nitoring/ -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 08, 2006 12:24 AM To: CF-Talk Subject: Re: Site Monitoring Microsoft Operations Monitor (MOM) can do all this for you. For ColdFusion monitoring, you should obviously look for SeeFusion, FusionReactor, or wait for CF8 :-) This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant, Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business, Registered in England, Number 678540. It contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender or call our switchboard on +44 (0) 20 89107910. The opinions expressed within this communication are not necessarily those expressed by Reed Exhibitions. Visit our website at http://www.reedexpo.com -Original Message- From: Dave Francis To: CF-Talk Sent: Tue Nov 07 18:12:34 2006 Subject: Site Monitoring Is there any software out there that can monitor and alert me whenever my site crashes or starts to respond unacceptably slowly Win2k/IIS5.0 mailto:[EMAIL PROTECTED] (or what terms should I google for?) Thanks, Dave ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259583 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Session.UrlToken on form post in CF7
James - Rupesh blogged about this very issue recently: http://coldfused.blogspot.com/2006/09/handling-j2ee-session-with-cookies _12.html -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 19, 2006 7:17 AM To: CF-Talk Subject: Session.UrlToken on form post in CF7 We've just updated to CF7 on our dev server. Code that worked on CF6.1 is now breaking. On a form post, to a different subdomain, I am passing the session.urltoken in the action URL to ensure we get the right session (it's the same server, just a different subdomain). The jsessionid ends up being incorrect on the other page and we get the wrong session. I have confirmed that changing the action to a GET (and making no other changes) gives the correct result. In other words, the POST action is ignoring the passed jsessionid while a GET doesn't. Can anyone confirm this in CF 7.0.2 and does anyone have a fix (other than a GET if possible). ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:253480 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Peg = Margaret name matching code
Mike, I think you're looking for a soundex (http://en.wikipedia.org/wiki/Soundex), which does a sounds like comparison. I know that Oracle and SQL Server support soundex in the database - that might be the easiest thing to do. http://msdn2.microsoft.com/en-us/library/ms187384.aspx http://www.techonthenet.com/oracle/functions/soundex.php Ashwin www.sanmathi.org -Original Message- From: Mike Chabot [mailto:[EMAIL PROTECTED] Sent: Sunday, September 03, 2006 8:44 PM To: CF-Talk Subject: Peg = Margaret name matching code Does anyone know of code that can match formal names, such as Michael with their less formal equivalents, such as Mike. I was starting to code this but stopped after realizing that there were thousands of these nicknames. I am mainly interested in names, but matching addresses abbreviation, such as Blvd = Boulevard might be helpful as well. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251942 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: site that can't be copied
I don't know if it's malicious, but it's certainly very rude. I would certainly count myself amongst those who have learned the HTML/JS end of our trade by way of view source. As we sow, so shall we reap? Ashwin www.sanmathi.org -Original Message- From: Bryan Stevenson [mailto:[EMAIL PROTECTED] Sent: Thursday, August 10, 2006 5:01 AM To: CF-Talk Subject: Re: site that can't be copied If you disable JS the site redirects you to a php page instructing you to enable JS What a tremendous waste of time, anyone who really wants to take content from them can obviously still do it... -- Alan Rother Yep...I found the same issue when disabling JS Alan, but it was SO easy to grab content in various ways...save as HTML or view source. They have gone one further than the standard no right-click, but not in a nice way. I heard just this week that Google may start flagging search results for sites with malicious software on them to help protect the unwashed masses from themselves. Anyone else heard about that? I wonder if this site would qulaify as malicious? ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:249400 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: iif: am I understanding correctly?
I've seen debates around this so many times I decided to blog it: http://blogs.sanmathi.org/ashwin/2006/07/24/whento-evaluate-and-iif/ In summary - evaluate() and iif() will perform well when the expressions being evaluated remain static, since the Java classes that are compiled to process the expressions are cached in memory. If the expressions change from call to call (different sets of operators and variables), then these will be expensive, since the expressions will have to be compiled into Java classes for every call. -Original Message- From: Snake [mailto:[EMAIL PROTECTED] Sent: Monday, July 24, 2006 2:18 PM To: CF-Talk Subject: RE: iif: am I understanding correctly? This always makes me laugh. Why don't you make a page with CFIF, then run it Now use IIF() and run it What difference do you see in execution time? Bugger all. If you make a big loop that calls IIF 1000 times then you may notice a difference. Also imagine this code select name = bob #IIF(name is bob, 'selected','')# Now do the same thing with CFIF/CFELSE, how messy is that. Don't NOT use something just because some cycle counting freak tells you not to because you must save every possible 1000th of a millisecond. At least try it for yourself first. - Snake -Original Message- From: Mike Soultanian [mailto:[EMAIL PROTECTED] Sent: 24 July 2006 04:17 To: CF-Talk Subject: Re: iif: am I understanding correctly? Don't use iif() Always use cfif/cfelse instead of iif(). It is significantly faster and more readable. Mike ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:247476 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Own implementation of cachedwithin functionality
I wrote a memory sensitive cache a little while ago: http://blogs.sanmathi.org/ashwin/2006/07/01/memory-sensitive-caching-for -cf/ You'd have to build some infrastructure over it to push query objects in. -Original Message- From: Snake [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 18, 2006 8:17 PM To: CF-Talk Subject: RE: Own implementation of cachedwithin functionality There are a few around Have a look at this one http://www.pixl8.co.uk/index.cfm/pcms/site.products.CF_Hypercache/ There is also a cf_turbocache Snake -Original Message- From: Tom Kitta [mailto:[EMAIL PROTECTED] Sent: 18 July 2006 15:14 To: CF-Talk Subject: Own implementation of cachedwithin functionality I was wondering whatever anyone has written a modern query caching framework (CFC or set of) that works in a way similar to cachedwithin parameter of cfquery tag but offers none of its many limitations (the main limitation would still be RAM but with full control over it) ? TK ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:247021 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: What determines session inactivity timeouts?
Hey Reed, Try replacing your test.cfm with this: cfobject type=JAVA name=obj class=java.lang.Thread action=CREATE cfdump var=#session# cfset session.x=1 cfdump var=#session# cfoutput#timeformat(now(),HH:MM:SS)#/cfoutput cfset obj.sleep(7) BRBR cfoutput#timeformat(now(),HH:MM:SS)#/cfoutput cfdump var=#session#br cfoutputx=#session.x#/cfoutputbr cfset session.x=2br cfoutputx=#session.x#/cfoutputbr You can set values to the session even after it's expired (with one exception, see below), but these will hold only for the execution of the current page - touching a session after it's expired will not bring it back to life, sorry, no night of the living dead sessions (apologies all, I couldn't quite resist that)! The exception to the rule - if Use J2EE session variables is off on your administrator, execution will proceed with no problems. However, if it's on, an exception will be thrown trying to set session.x after the session has timed out. This is because the reference to the the session object maintained by CF has been cleared from the associated J2EE session. Ashwin -Original Message- From: [EMAIL PROTECTED] [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 26, 2006 11:06 PM To: CF-Talk Subject: Re: What determines session inactivity timeouts? OK, I did what I should have done before starting this thread, which was to rig up a test case to see what happens. Pretty interesting results. It appears that CF keeps the session vars alive during page processing, even if there is no activity with those vars. Here is what I did: In Application.cfm: cfapplication name=test clientmanagement=no sessionmanagement=yes setclientcookies=yes setdomaincookies=yes sessiontimeout=#createtimespan(0,0,1,0)# applicationtimeout=#createtimespan(0,1,0,0)# loginstorage=session In Test.cfm: cfobject type=JAVA name=obj class=java.lang.Thread action=CREATE cfdump var=#session# cfset session.x=1 cfdump var=#session# #timeformat(now(),HH:MM:SS)# cfset obj.sleep(7) BRBR #timeformat(now(),HH:MM:SS)# cfdump var=#session# HERE IS WHAT HAPPENED: First time I executed test.cfm, I got three CFDUMPS of the session scope: dump 1 had no vars in it, dumps 2 and 3 showed the var I set in my code. Since there was a 70 second pause between 2 and 3, and the session var timeout was set to 1 minute, that tells me that CF kept the session vars alive. I waited 2-3 minutes and reran, with the same output - which shows that CF did in fact destroy the session vars after the 60 second timeout occured between the two page requests. Then I ran another variation: I ran the script again, and then when it finished I reran it immediately, and guess what - the session var was gone! That makes it look like CF kept the session var alive during the script's execution, even though the timeout was reached, but deferred destroying the var until the request completed. So I did another scenario: ran the same test in 1 browser, but with the pause set to 2 minutes, and immediately in another browser window ran a script that simply did 2 CFDUMPs of the session scope with a 60 second pause between them. The second window (which began and ended during the first window's 2 minute pause period), showed the session var to be alive on both dumps. I refreshed it's screen immediately, and when it finished the session var was gone. This tells me that when CF deferred destroying the session var during the first script's execution, it kept the var alive for all other requests, not just for the currently executing one. Final test - I changed the second script's pause to be 2 minutes, and waited about 10 seconds after running the first script before starting the second, to see what happens to the session vars for the second script when it it still running after the first script ends. The session vars for the second script were still there on both dumps, which is pretty interesting because it said that when CF saw that the second script was running it kept the session vars alive, even though it never touched any of them. But the immediate rerun of the second script showed that the vars were gone as soon as it had finished. Bottom line is that session vars don't dissapear out from under you during script execution, but when the lifeguard blows the whistle the session vars are gone as soon as the last guy is out of the pool - unless someone new jumps into the pool and actually touches a session var. Whew Reed It is possible that the delay could occur while processing a single CF tag, therefore, you would have no way of touching a session variable. For example, the session timeout is 5 minutes. On the page, you have a CFFILE tag that save a huge amount of data to a text file. It could take 7 minutes to save the file. By the time the CFFILE tag completes, the session has expired. There is no way to hook into the CFFILE tag and have it restart the session
RE: Get String Byte Size
Try this: http://martin.nobilitas.com/java/sizeof.html The empirical formula derived there indicates that string memory is 38+/-2 + 2*(string length) bytes. In my own tests on JDK 1.4.2_09 I got something similar: 40 + 2*(string length) bytes when length2. For length 0 to 2, the size works out to just 40 bytes. That said, as Nick mentions, if all that you're trying to do is get an idea of the relative memory occupied by different strings, rather than the actual physical memory (which, as discussed in the link above, can be determined only empirically, not precisely), you might be best off just checking the length. -Original Message- From: Nick de Voil [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 19, 2006 9:47 PM To: CF-Talk Subject: Re: Get String Byte Size Anyone have any quick code to retrieve the number of bytes in a string /without/ writing the string to a file first? I'm trying to do a little debugging and I'd like to know the size of a string that is being returned to the browser. The number of bytes occupied in the application's memory by the Java String object is probably not the same as the number of bytes occupied by the same string in the HTTP response. I could be wrong on some points below but I'm sure others will correct me if so (Paul?) As I understand it, a Java program such as CF always stores characters internally using UCS-2 encoding, i.e. 2 bytes per character. In addition, the String object will include 20 or 30 extra bytes for storing the length of the string etc. I believe that CF's default behaviour is to encode HTTP responses using UTF-8 encoding, i.e. 1 byte per character if you're only using ASCII characters, and of course the extra bytes used by the String object won't be there either. So let's say your string is Rob. - In CF the Len() function gives you 3. - The size of the Java object - even if you could work it out, which is next to impossible in Java - would be 6 + the extra bytes, maybe 40 or more. - But in the HTTP response it would probably be 3. So, if I've understood your question correctly and it's the HTTP response you're interested in, just using Len() in CF will give you the best answer. Nick ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238247 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54