coldfusion

Coldfusion 8 access to MySQL database without datasource

My webhosting doesn't allow us to access and modify the datasource, but having CF8, anyone have done access to mysql before? Do I need to use PHP? ...

Encryption is hard: AES encryption to Hex

So, I've got an app at work that encrypts a string using ColdFusion. ColdFusion's bulit-in encryption helpers make it pretty simple: encrypt('string_to_encrypt','key','AES','HEX') What I'm trying to do is use Ruby to create the same encrypted string as this ColdFusion script is creating. Unfortunately encryption is the most confusing ...

MySQL data type: Text,,, Erroring: Data Too Long

I have a field as follows in MySQL: Type: Text Length: 0 Decimals: 0 And when I try to insert data around the size of 4 pages of MS Word, Coldfusion errors with: Data Too Long from the DB. I thought TEXT data type was able to expand and handle this size of data? What am I missing and what can I do? ...

Error premature end of file pops up when accessing a URL

Hi, I am using Coldfsuion 8.0.1 and Solaris 10 and when i try to run this URL, http://IPADDRESS/flex2gateway/http I am receiving an error message "Premature end of file". Please help me out if i am missing any installation/fix. And when i hit the same URL from browser it shows: <amfx ver="3"> − <body targetURI="/onStatus" responseURI=...

How to get a dynamic attribute name in cfloop over query in ColdFusion

I'm inside a cfloop over a query. I want to get an attribute, but I won't know what that attribute will be until runtime. Using #qryResult[MyAttr]# fails with the error "Complex object types cannot be converted to simple values." What is the syntax for doing this? Here is a simplified example: <cfquery datasource="TestSource" name="qr...

FTP - way to programatically determine time remaining or bytes transfered?

Hi all I want to make an FTP connection (ideally using Coldfusion 8, but Java is fine too) that will copy a file to a remote server. Crucially however, I want to know how many bytes have been transferred so I can give some feedback to the user. Is this possible, and if so what FTP API would you recommend as I understand the Sun imp...

How do I prevent SQL injection with ColdFusion

How do I prevent SQL injection when it comes to ColdFusion? I'm quite new to the language/framework. Here is my example query. <cfquery name="rsRecord" datasource="DataSource"> SELECT * FROM Table WHERE id = #url.id# </cfquery> I see passing in url.id as a risk. ...

EHCache on Coldfusion 9 - can I create multiple caches or disable it?

Hi all. We have been using EHCache with CF8 for a while now with no issues. We are now moving to CF 9 and it seems that the baked-in version of EHCache with CF 9 is actually conflicting with our EHCache setup. So is there: Any way to disable the baked-in version of EHCache? This would be a temporary solution. If we use the CF9 baked...

ColdFusion RDS through Basic Authentication

Is it possible to enable RDS for ColdFusion 8 on a server that requires Basic Authentication? The web server is IIS. ...

destroy cfwindow in javascript 'is not a function'

Hi All, Having an issue here that I have tried everything I can think of but cant get it to work. I have a page with a link that creates a cfwindow like so function create_window(ID){ var config = new Object(); config.modal=true; config.center=true; config.height=775; config.width=700; config.resizable=false; ...

Getting XML parse error in ColdFusion. Can the packet returned be validated?

Getting an error on occasion on a specific CF page. Offending code listed below. Very odd because when I rebooted CF it went away. Can the XML be checked via XMLValidate to prevent this from happening? Is this some sort of CF bug since the error disappeared after reboot of CF? I have a feeling that the error will resurface at some poi...

Returning two or more values from a function

I need to return multiple values from a ColdFusion function in an ajax callback function. Here's what I've got: $('input[name="StateName"]').live('change', function() { var StateID = $(this).parents('tr').attr('id'); var StateName = $(this).val(); $.ajax({ url: 'Remote/State.cfc' ,type: "POST" ,data:...

Coldfusion 9 Inter portlet communication?

I am having a hard time trying to find documentation at achieving IPC using Coldfusion 9 portlets under JBOSS. Does anyone have any good references I can take a look at? Or maybe some example code that I can go off of? So far I've been successful in getting my portlets working under Liferay (JBOSS), form submission, different views (ed...

Extract XML name/value pairs from different nodes in Coldfusion

Hi All, I am working on some Plesk integration using the XML API and I am trying to figure out how to parse the XML response that I get back. Most of the data is fine, but the Limits and Permissions are setout differently. Essentially they are set out like so: <data> <limits> <limit> <name>foo</name> <value>bar</value...

How to get back text in html format by using something like URLDecode

I am passing value of text-area in a.cfm in variable of GetXmlHttpObject to b.cfm page and displaying the value in a . How can I get exact formatting of the text I entered in text-area of a.cfm page into div of b.cfm page. a.cfm <textarea name="sum1#i#" id="sum1#i#" html="yes" cols="98" rows="5"></textarea> [my text area] url=ur...

Using URLEncodedFormat with REReplace

I'm trying to change instances of the following line: URL: http://www.google.com/?s= test to URL: <a href="http://www.google.com/?s=%20test"&gt;http://www.google.com/?s= test</a> note that the anchor url is url encoded I've managed to get parse the URL part using a very simple regex: <cfset getFacts.fact_details = REReplace(getFa...

How to get IP address of your application server

I need to be able to find the IP address of the server the page is currently executing on. I have some code that calls a third party site and has to pass a specific key that changes depending on which server it is on. Is there a CGI variable or some way in ColdFusion to determine what the IP address is of the host server? ...

Inexpensive CFML hosting on servers in EU

I'd like to change shared-hosting from servers located in US to EU in order to decrease number of hops and latency. Anyone having first hand experience with Coldfusion/Railo/OBD hosting providers from Europe? ...

How to match ColdFusion encryption with Java 1.4.2?

* sweet - thanks to Edward Smith for the CF Technote that indicated the key from ColdFusion was Base64 encoded. See generateKey() for the 'fix' My task is to use Java 1.4.2 to match the results a given ColdFusion code sample for encryption. Known/given values: A 24-byte key A 16-byte salt (IVorSalt) Encoding is Hex Encryption al...

cfml error with application.cfc page

Hi, I have some problem with my cfml website. I have used the below code in application.cfc file to connect with the dsn. But when ever i put this in my server, i'm getting error. i cant browse even a single test.cfm page. Is there any mistake in that code , any syntax error or something like that, will it be some problem with the ds...