Local function variables in CFC

2006-03-21 Thread Ian Buzer
Hi everyone,

I find myself getting more and more wound up that variables set within a cfc 
function are not scoped to that function but to the entire cfc.

I'm ending up with a whole series of  at the 
beginning of the function which is messy and to me is asking for trouble, 
especially if myVariable is not a string. It's also very easy to miss one.

So I've had an idea. At the beginning of each function, I'm going to add:



Which effectively creates me my own local variable scope. I can then create 
variables like local.myVariable, safe in the knowledge that they are local and 
thread safe.

Good idea? Bad idea?

Thanks
Ian

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235866
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


cfmail - is it vulnerable?

2006-02-19 Thread Ian Buzer
Hello,

Just got a bunch of emails in my inbox this morning that had been sent from a 
contact form on one of my web sites. They all contained content a bit like this:

deeper
xxContent-Type: multipart/alternative; boundary=e00c35d22e0dba33a15957f33286efe8
MIME-Version: 1.0
Subject: idee is that a
bcc: [EMAIL PROTECTED]

This is a multi-part message in MIME format.

--e00c35d22e0dba33a15957f33286efe8
xxContent-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit

v coorse, he thinks marredge is goin to change
--e00c35d22e0dba33a15957f33286efe8--

...

It looks like someone's trying to test to see if the form is vulnerable to 
having headers injected into it. In fact, on one of the attempts, he did manage 
to override the subject of the email.

Does anyone know if cfmail is vulnerable to this kind of thing? It looks like 
it might be.

What's the best way of preventing it? Perhaps I'll have to start replacing out 
any instances of "Content-Type" in any email form fields :(

Ian

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232830
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: How to recognize robots

2005-10-31 Thread Ian Buzer
>One bot loaded this page 15 times before it left!

I don't want to rain on your parade, but I'd be very surprised if an email 
harvesting bot would be intelligent enough to parse that javascript and suck up 
the generated output. Remember that the Javascript has to be processed client 
side.

I might be wrong though. I know people do sometimes use JS document.write to 
protect email addresses from harvesters, and it could be that some of them are 
keeping up in the arms race.

Ian

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222717
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


Re: Paging through records

2005-08-31 Thread Ian Buzer
>C'mon, this is just too inefficient: you're converting column messageId 
>of query getMessageIds to a list in the loop!

I did say that

Ian

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217001
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


Re: Paging through records

2005-08-31 Thread Ian Buzer
OK, managed to duplicate post and still screw it up!

The IN clause of the second query should be:

WHERE messageId IN (#ListGetAt(ValueList(getMessageIds.messageId), i)#)

This is only an illustration - it's probably worth creating the ValueList 
outside the loop to avoid creating a large list multiple times.

Ian

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216957
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


Re: Paging through records

2005-08-31 Thread Ian Buzer
Hi,

I've just been through this.

I found that some of the threads in our forums were nearing 1000 messages, and 
the query containing all this was about 1.5Mb in size.

The only snag with using a stored procedure for this is that it is very 
difficult to get a RecordCount for the entire query.

The way I finally did it was to run the query twice:


   SELECT messageId
   FROM messages
   WHERE threadId = #threadId#
   .. any other criteria
   ORDER BY messageId



   SELECT messageId, messageTitle, messageBody etc. etc.
   FROM messages
   WHERE messageId IN 
   ORDER BY messageId


This reduced my memory usage from 1.5Mb for one query to about 50k for both 
queries. Also the execution time for the two queries was about the same as for 
the one large query.

There is a tipping point on this - if your queries are returning less than 
about two pages of results, you may use slightly more memory and take slightly 
more time. But I decided that using 12k instead of 10k occasionally outweighed 
regular 1.5Mb queries.

You also need to make sure that the ORDER BY clause is identical for both 
queries.

Caching the first query seems to make sense as it is very small in size and 
will be used multiple times as the user pages through the results.

I created myself a simple generic helper component to hold everything, which 
had methods such as:

setFullQuery() - contains results of first query
setStartRow()
setMaxRows()
getPagedIdList() - returns Id list for the IN clause of second query
setPagedQuery()
getPagedQuery()
getRecordCount()

The memory useages and times above include the overhead of this component.

Ian

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216956
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Paging through records

2005-08-31 Thread Ian Buzer
I've just been through this.

I found that some of the threads in our forums were nearing 1000 messages, and 
the query containing all this was about 1.5Mb in size.

The only snag with using a stored procedure for this is that it is very 
difficult to get a RecordCount for the entire query.

The way I finally did it was to run the query twice:


   SELECT messageId
   FROM messages
   WHERE threadId = #threadId#




   SELECT messageId, messageTitle, messageBody etc. etc.
   FROM messages
   WHERE messageId IN 


This reduced my memory usage from 1.5Mb for one query to about 50k for both 
queries. Also the execution time for the two queries was about the same as for 
the one large query.

There is a tipping point on this - if your queries are returning less than 
about two pages of results, you may use slightly more memory and take slightly 
more time. But I decided that using 12k instead of 10k occasionally outweighed 
regular 1.5Mb queries.

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216955
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Cached query - Any way to tell when it was cached?

2005-05-10 Thread Ian Buzer
How about adding:

getdate() AS cachedSince

to the list of columns in the query. getdate() is a SQL Server function but 
most dbs should have an equivalent function.

Ian

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:206268
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: SQLServer Connect problem - was it ever resolved?

2005-05-02 Thread Ian Buzer
Are you using Windows 2003? If so, have you updated SQL2000 to the very latest 
service pack? 

To quote Microsoft, "Microsoft Windows Server™ 2003 supports only SQL Server 
2000 with Service Pack 3"

What they mean is that there is a bug in SQL on 2003 whereby it won't 
communicate across TCPIP. SP3 fixes it.

You won't believe how long I messed around with firewalls before I figured that 
one out :)

Ian

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:205212
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


Re: Are ""search engine safe"" URLs really necessary?

2005-04-26 Thread Ian Buzer
Google does treat SES URLs slightly differently in that it will spider pages at 
a significantly slower rate if it thinks the pages are dynamic. It is designed 
that way so that it doesn't bring the site down by over enthusiastic spidering.

I redeveloped an existing application into fusebox, so every URL changed. It 
had about 80k pages listed in Google. When I first relaunched it, Google was 
picking up the new pages at a rate of about 100 per day. I then switched to SES 
URLs and almost the next day this rate increased to a few thousand per day.

Ian

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204403
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


Re: Sessions being show to wrong users?

2005-01-26 Thread Ian Buzer
I'd back up Martin's theory of it being search engines indexing the site with 
the CFID/CFTOKEN in the URL. If two people follow that link within the session 
time out they will share the session. 

I now only use CFID/CFTOKEN in the URL from behind a log in page, or after 
someone has added an item to the basket etc ... all things a search engine 
can't do.

It's always occurred to me that this is a massive security hole in the way that 
ColdFusion manages sessions. Having said that, most application servers use a 
similar method of maintaining session when cookies are not enabled.

Ian

>What is the URL that these people are coming in on ? Meaning, has Google
>cached one of your pages which has mypage.cfm?CFID=xxx&cftoken=xxx in
>the URL. 

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191760
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


Re: Java memory usage

2005-01-14 Thread Ian Buzer
>http://www.bpurcell.org/blog/index.cfm?mode=entry&entry=967

Perfect!

Many thanks.

Ian

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190464
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Java memory usage

2005-01-14 Thread Ian Buzer
Ooh, this is interesting - and timely as I'm currently wrestling with 
java.lang.outOfMemoryError errors at the moment.

Is there any way of telling how much 'permanent' memory (as set by MaxPermSize) 
is being used?

I read that if you have a lot of files in /cfusionmx/wwwroot/WEB-INF/cfclasses/ 
you will need a larger MaxPermSize but how much is a lot? The files on disk 
weigh in at 29.6Mb - is that a fair measure of how much they would occupy in 
memory?

Ian



~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190446
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


Re: Sessions not exclusive

2005-01-10 Thread Ian Buzer
Are you passing round the CFID and CFTOKEN in the URL?

If so, make sure nowhere links to your site with those tokens in the link - if 
two people click on the link within 20 minutes of each other (or whatever your 
session timeout is), they will share a session.

We used to have this problem with search engines on the Internet. They would 
index our site with the CFID and CFTOKEN intact and, as the site grew more 
popular, people clicking through the same link on the search engines would be 
sharing the same session. As you can imaging, this was quite an embarassment.

Now I only use the tokens in the URL if they are behind a POSTed log in box.

Ian

~|
Get the mailserver that powers this list at 
http://www.houseoffusion.com/banners/view.cfm?bannerid=17

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189780
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: "upgrade" site from FB2 to FB>2

2005-01-05 Thread Ian Buzer
>I don't have any sample code I can distribute, but request overhead is
>greatly reduced in FB4 due to some built-in caching mechanisms.

True when compared to FB3, but I'm not so sure when compared to FB2. FB2 had no 
core code - the only request overhead was URL2Attributes.

FWIW I migrated an app from FB2 to FB3 and found it painfully slow and resource 
intensive. I then went to FB4 and it is running beautifully. Apart from initial 
startup (when it loads all the XML definition files into memory) the overhead 
is almost unnoticeable.

I was sceptical at first but I think you will find FB4 _so_ much easier to 
maintain than FB2. Also, once you've sorted out your layouts, you can port 
between the two fairly easily provided you haven't done anything wierd in FB2 - 
just a case of rewriting your index.cfms to circuit.xml.cfms (oh, and recoding 
all your links).

Migrating to Mach-ii will be more of a task - pretty much a rewrite probably as 
you are shifting to an object based methodology. Same applies if you move to an 
MVC model with FB4.

Ian

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189338
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


Re: Single application - multiple users with differing specifications

2004-12-28 Thread Ian Buzer
Another thought.

Whatever you do, bear in mind that department C and D will be along soon with 
their own requirements. You need to be able to design something whereby you can 
accomodate this without multiplying the amount of code you produce. It's 
probably worth thinking "How will this look if I find myself with 10 or 20 
departments, each with their own requirements".

Ian

~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188849
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


Re: Single application - multiple users with differing specifications

2004-12-28 Thread Ian Buzer
Hi,

I don't think this is particularly unusual...

While department B wants additional features and won't use some of the 
existing, I am assuming that the features they share, and indeed the business 
rules behind them all are common.

In that case, write an application that does everything for everybody, then set 
up a security matrix that hides/disables the functionality from those 
users/groups/departments that don't want it (or shouldn't be using it for 
security reasons).

I seem to remember there was a thread on this list recently discussing various 
security models using groups, roles and authorities.

If you're using an architechture like fusebox, you can easily restrict an 
action or a circuit to a particular group or user.

Ian

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188848
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: AW: In One?

2004-12-23 Thread Ian Buzer
>Check out the book "trees and hierarchies in SQL for smarties" by Joe
>Celko. ISBN: 1-55860-920-2
>It gives a very good overview about how to treat trees in a SQL
>database. 

That's what I love about this business. You think you're the only one to have a 
particular problem, then you find out someone wrote a book on it :)

Thanks
Ian

~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188719
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: In One?

2004-12-23 Thread Ian Buzer
>Cache the data (application-scope variable) then use local UDFs or a CFC
>to manage processing.

Yes, I'm beginning to think this may be the best compromise. Particularly as, 
although there's about 18k categories, probably 10% of those are queried 90% of 
the time.

So, following on from this ... does anyone know if there is a way of 
programmatically 'sizing' a variable (or CFC) to see how much memory it's 
consuming? 

Ian


~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188677
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: In One?

2004-12-23 Thread Ian Buzer
>You could set your table up in a "modified preorder tree traversal", so
>each node has a "LFT" and "RGT" numeric value. I've done this in several
>instances and it works great. 

Hey, thanks Dov, that's lovely.

As far as I understand it so far, it does have the snag that if you make a 
change near the top of the hierachy, a whole lot of data below has to be 
updated.

Also, in this particular instance, I'm importing the category heirachy from 
another app on a daily basis which uses the other schema, so I'm probably 
looking at a long process to convert it from one schema to another during the 
import.

Ian

~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188640
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


In One?

2004-12-23 Thread Ian Buzer
Hi,

This has been bugging me for about 3 years now, and I've finally decided to see 
if I can beat it (er... well see if I can find someone else that can beat it :)

I've got a db table with a typical category heirachy structure:

categoryId, parentCategoryId, categoryName,  etc..

Given a particular categoryId, is it possible to get the path back to the root 
category in only one db query? (given that the depth of the category in the 
structure is unknown).

Ian

~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188611
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: JRE

2004-09-29 Thread Ian Buzer
>When you upgrade your JRE from the vanilla CFusionMX JRE there is no server
>folder in the bin folder of the system (Sun Java).

I'm going through the same thing at the moment.

It appears if you download the SDK, the JRE within there does have a server folder.

If you install JRocket, that has a folder called jrocket but not a server or a client folder. Rename that folder to server and it appears to work.

Ian
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: SOT: Action Canceled, XP Service Pack 2

2004-09-25 Thread Ian Buzer
I assume you're writing the html/xls file to disk here?

How about generating the html as a normal request, then placing this at the top:



You can then link to this URL directly and it will download as an excel spreadsheet.

Ian

>I'm using a combination of Flash and Coldfusion web services to generate 
>an Excel Spreadhseet (technically, the web service saves an html file on 
>the server with a .xls extension), and returns the URL to Flash.  Flash 
>then uses getURL to open the .xls file in a new browser window.
>
>This worked great but now with Windows XP Service Pack 2, the new window 
>pops up and then is filled with an "Action Canceled" message.  If you 
>click "Refresh" in the toolbar of that window, it opens the spreadsheet 
>just fine.
>
>Has anyone experience a similar problem and solved it?
>
>--
>Another annoyance with Service Pack 2 is the popup blocker, which also 
>blocks the new window.. it's not technically a popup... it's just a new 
>browser window.. like 
>
>But even after allowing popups from the domain, you still get the 
>"Action canceled" message..
>
>  - rick
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: 100% CPU

2004-09-01 Thread Ian Buzer
>got a link to the thread on MM forums so we can monitor that as well?

Sorry - all the diagnosis happened via email.

Ian
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: 100% CPU

2004-09-01 Thread Ian Buzer
Hi all,

An interesting update to this thread.

I posted a message to the forums on the Macromedia site, and it got picked up by someone at Macromedia. Anyway, after sending him the contents of a few log files, it looks like he's traced it to a bug in the ColdFusion client variable purging system. Apparently there are bugs in this that cause connection leaks and it's slow which can cause a backup of requests.

There is a hotfix for this at:
http://www.macromedia.com/support/coldfusion/ts/documents/client_purge_hotfix.htm

Apparently this wasn't included in the Updater?

Also, there is a bug in the hotfix (!) which appears to mean that client variables are not deleted at all. This is to be fixed by another hotfix in the next few days but I am told it is better to apply the original  hotfix in the mean time.

So, if you are getting unexplained surges in CPU on an hourly basis (hourly from when the service is started) then this could be your problem.

Ian
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: 100% CPU

2004-08-31 Thread Ian Buzer
Hi Andrew, Bill,

We've been running ServersAlive for the last couple of years, which has been cycling the service automatically everytime the system slows and like you say, this has worked well as a backup. 

Trouble is, it was doing this about every 10 minutes when we had our recent problems - not really acceptable!

I've been doing my sums - 7000 requests per hour is on average 2 requests per second. I guess in real life this could increase to say 4 requests per second for a few minutes at a time. Maybe this is as much as a single processor can handle?

What other loads are people getting out of a single processor machine?

Thanks
Ian
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: 100% CPU

2004-08-31 Thread Ian Buzer
Hi Mack,

>You can try and get a stack trace to see what's happenning with CF when the problem
>occurs.
>http://www.macromedia.com/support/coldfusion/ts/documents/tn18339.htm

Good info - I'll check this out.

Thanks
Ian
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: 100% CPU

2004-08-31 Thread Ian Buzer
Hi vishnu,

Thanks for the reply. Just to understand what this does

Am I right in thinking this controls the cf scheduler? I'm fairly confident that our load problems are not related to scheduled requests as these occur overnight.

Or does the scheduler have other implications?

Thanks
Ian
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




100% CPU

2004-08-31 Thread Ian Buzer
Hi all,

We're running a CFMX 6.1 / SQL server 2000 app on a 1.6GHz AMD server with
1.5Gb of RAM.  The app gets about 2.5 million page requests a month, peaking 
at about 7000 page requests per hour.

Since yesterday morning it's suddenly started to misbehave, with the
processor regularly maxing out at 100%. It will run clean an fast for 20 
minutes or so, then suddenly requests will start to queue up and the 
whole thing grinds to a halt. Usually it recovers, but sometimes the
service needs restarting to get it back.

The app is well behaved, with most requests taking about half a second. 
There seem to be no particular long running requests that trigger it.

This happened a couple of months ago and I restricted the amount of memory
SQL server used and increased the RAM on the box to 1.5Gb. It currently 
appears to have about 3-400Mb free.

I've installed the CFMX updater (released a few days ago), reinstalled
ColdFusion, scandisked the drive and defragged.

I wonder if anyone can give me any clues on what else to look for. Surely we
should be able to get more traffic out of this spec machine?

Many thanks
Ian Buzer
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]