coldfusion-8

Why is a ColdFusion SESSION variable “undefined” after being referenced a few lines before?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-07 09:38:30
问题 Running ColdFusion 8.01 Standard on Windows2003/IIS6 Application.cfc: <cfcomponent output="false"> <cfscript> THIS.SessionManagement = "Yes"; THIS.SessionTimeout = CreateTimeSpan(0, 3, 0, 0); THIS.ApplicationTimeout = CreateTimeSpan(0, 8, 0, 0); </cfscript> <cffunction name="onRequestStart" returnType="Boolean" output="false"> <cfargument name="targetPage" type="string" required="true"> <cfscript> if (!StructKeyExists(SESSION, "User")) SESSION.User = CreateObject("component", "cfc.User"); <

Coldfusion not converting accented text or MS Word chars

别说谁变了你拦得住时间么 提交于 2019-12-07 05:19:44
问题 Running Coldfusion 8, I am trying to clean text input before saving to a database that will take things like the MS equivalent of ' " - and accented letters, and converting them. I have tried replace, REReplace, and various UDFs found on the internet. None seem to work. In fact, I tried this: <cfscript> function cleanString(string) { var newString = string; newString = replace("'", "'", ALL); return newString; } </cfscript> The single quote to be replaced above is a MS Word style single quote

How can I run a ColdFusion scheduled task at an interval <60 seconds?

倖福魔咒の 提交于 2019-12-06 21:17:22
问题 I have a CFC method that I would like to run at an interval of 30 seconds. However, the problem is ColdFusion won't let me schedule a task that runs at an interval of 60 seconds or lower. Does anyone have a suggestion about how I can (and should) accomplish this? To preemptively answer the question "What happens when your script runs longer than 30 seconds," or any other question like that, I have already taken all that under consideration and it is not a concern. I'm running ColdFusion 8.0.1

How to setup java libraries with javaloader in Coldfusion8?

只谈情不闲聊 提交于 2019-12-06 17:41:19
问题 I'm trying to get javaLoader to run in a Coldfusion8 application and I need some help to get me across the finish line. This is what I have so far: Inside application.cfc : ... THIS.mappings["/javaloader"] = GetDirectoryFromPath( GetCurrentTemplatePath() ) & "tools/javaloader"; ... <cffunction name="onApplicationStart" returnType="boolean" output="false" hint="application initalizer"> <cfscript> Application.str = structNew(); Application.str.myJavaLoaderKey = "someUUID_javaloader";

How can I scale an image with ColdFusion without losing resolution?

混江龙づ霸主 提交于 2019-12-06 13:14:17
Server Config: Windows Server 2003 IIS 6 ColdFusion 8 Standard Edition Java Version 6 Update 18 I have a ColdFusion application that allows users to upload images that will be added to an existing PDF. When the images are added to the PDF, they have to fit within a minimum/maximum height and width, so the uploaded image needs to be scaled to fit. For instance, let's say the minimum height and width for a given image is 100x100, and the maximum height and width is 200x200, and the user uploads an image that is 500x1000. I use the logic below to scale that image down without skewing the image

Can we renew session in Coldfusion?

隐身守侯 提交于 2019-12-06 11:56:06
I am storing 5-6 variable values in my session. Any suggestions on how can I renew my session struct when its about to expire? I am using Coldfusion 8. Thanks!! Use AJAX to ping the server to keep the session alive Or just simply extend the session timeout timeSpand. Any call to a CFM page from that session would cause the session to be extended. What I have seen done is a JS timer will be running and end shortly before the session expires. When the timer runs up it triggers a popup that loads a non CFM page(basic HTML) and that page states a message about the session ending soon and asking

Using BETWEEN on a varchar field not a numeric field?

早过忘川 提交于 2019-12-05 16:31:41
I am using ColdFusion 8 and SQL Server 2008 R2. I am trying to query a column of values to get rows with a value within a range. The column SHOULD be numeric, but it's not. It's setup as a varchar (by someone else). There are 100,000+ rows of data. Here's a FAKE sample of the data: ID COLUMN 1 1 2 1.2 3 0.9 4 5 5 -6 My query looks like this: select column from table where column between 1 and 2 This query won't run because the where statement's column is a varchar, and I get a conversion error, so I have to change the where statement to this: where column between '1' and '2' Now, when I run a

Why is a ColdFusion SESSION variable “undefined” after being referenced a few lines before?

醉酒当歌 提交于 2019-12-05 15:23:42
Running ColdFusion 8.01 Standard on Windows2003/IIS6 Application.cfc: <cfcomponent output="false"> <cfscript> THIS.SessionManagement = "Yes"; THIS.SessionTimeout = CreateTimeSpan(0, 3, 0, 0); THIS.ApplicationTimeout = CreateTimeSpan(0, 8, 0, 0); </cfscript> <cffunction name="onRequestStart" returnType="Boolean" output="false"> <cfargument name="targetPage" type="string" required="true"> <cfscript> if (!StructKeyExists(SESSION, "User")) SESSION.User = CreateObject("component", "cfc.User"); </cfscript> </cffunction> </cfcomponent> Template file Pseudo-Code Sample: LOCAL.qItems = CreateObject(

Periods in URL causes ColdFusion error

二次信任 提交于 2019-12-05 11:07:39
I am currently having issues with users (or bots, not sure) visiting non-existent links that have three periods in a sub-directory. For example, if someone goes to: http://www.example.com/.../test/index.cfm? Then I receive the following error: String index out of range: -1 null The error occurred on line -1. I have tested it with just 1 period and just 2 periods and it goes straight to a 404 error. Any link though that has 3 or more periods will cause this error. My question is what can I do to stop this from happening? My thoughts are to send them to a 404 error page or redirect them. How

How can I run a ColdFusion scheduled task at an interval <60 seconds?

梦想的初衷 提交于 2019-12-05 02:13:17
I have a CFC method that I would like to run at an interval of 30 seconds. However, the problem is ColdFusion won't let me schedule a task that runs at an interval of 60 seconds or lower. Does anyone have a suggestion about how I can (and should) accomplish this? To preemptively answer the question "What happens when your script runs longer than 30 seconds," or any other question like that, I have already taken all that under consideration and it is not a concern. I'm running ColdFusion 8.0.1 (w/ hotfix 4) on Windows Server 2003 (IIS6). As a side note, I'm using Java 1.6u21 as my JVM for