[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

ColdFusion Language

10K

Solutions

3K

Contributors

ColdFusion is a server-side rapid application development platform originally created by Allaire and now sold by Adobe, implementing the dynamic general purpose CFML programming language. The term ColdFusion is sometimes colloquially used to refer to the CFML language (Cold Fusion Markup Language), but can also include discussions of the server software implementation. ColdFusion runs using a customised version of Apache Tomcat. Earlier versions are bundled with JRun.

Share tech news, updates, or what's on your mind.

Sign up to Post

ColdFusion 9

I am trying to embed a signature image into an email.  The image is created:

<cfoutput><cfsavecontent variable="content">#TicketSignature#</cfsavecontent></cfoutput>
<cfset Signature = ImageReadBase64(content) />
<cfimage name="thisSignature" source="#Signature#" action="read" >

When I "WritetoBrowser" the image appears fine.  All good so far.

In my Cfmail tag I use:

<cfmailparam file="signature.png" contentid="signature" content="#thisSignature#" disposition="inline" type="image/png" />
and
<img src="cid:signature"> to show the image.

My problem:  For some reason the image in the email is viewed as a negative image ... black background and light blue signature.  Somehow, the cfmailparam tag is converting the image.  Why???  I have tried everything I can think of, but nothing will change it back to white background and black signature.

Any thoughts would be very helpful.

Max
0
Microsoft Azure 2017
LVL 12
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Coldfusion 10 Websockets Algorithm. I'm adding functionality to a simple coldfusion websocket chat application. The added functionality is 1) to display the name and picture of the person who is in the chatroom  and 2) to have a text file that all users can modify. I'm currently working on #1 but I just realized that I'll have to change the way the publish calls are made if I want to account for multiple operations. My question is: What is the best way to implement a ColdFusion websocket app to account for multiple actions. I understand that the publish method can accept "custom header" information so I'm following that methodology but I'm not sure how to read the header info and if I should do that on the javascript part or the server messageHandler. I'm passing in the info like this:  

wsObj.publish("ch1",'Hello World', {ui_trigger:  'btn3', empoyeeId: '12345'});

Does that seem right or is there a better way of doing it? I'm trying to capture the btn3 and 12345 data.

I have read websocket documentation and read multiple google searches for this but haven't really found a good example.
The main thing that I want to accomplish is to separate all actions and handle them all differently but to make sure all the data gets published to the other clients.
Application.cfc.txt
index.cfm.txt
postMaker.cfc.txt
ws.js.cfm.txt
0
When using ExpandPath, I will occasionally get something unexpected. For instance, I'm trying to move a file from one directory to another.
<cffile action="MOVE" source="#ExpandPath('/tmp/bloop.jpg')#" destination="#ExpandPath('/final-images/bloop.jpg')#">

Open in new window


This is the error I'm receiving:
An exception occurred when performing a file operation moving a file to another filesystem on files /var/www/vhosts/[sitename].com/tmp/bloop.jpg and /opt/coldfusion10/cfusion/bin/redirect:/final-images/bloop.jpg.The cause of this exception was: java.io.FileNotFoundException: /opt/coldfusion10/cfusion/bin/redirect:/final-images/bloop.jpg (No such file or directory).

You'll notice that the expanded base of the source is /var/www/vhosts/[sitename].com (which is what you'd expect it to be) while that of the destination is /opt/coldfusion10/cfusion/bin/redirect:

What's going on here? This isn't the first time I've run across this issue, but I can't seem to Google anything up about it. We're running CF10 on a Linux server. Thanks!
0
I have the below code sample and need to confirm the correct usage of CFTRANSACTION  and that a variable newID is being called to correctly:

<CFTRANSACTION>
<CFQUERY name="newID" datasource="#dsn#">
SELECT MAX(ID) + 1 AS newid FROM TLAApprovers
</CFQUERY>
 
<CFIF newID.recordcount is 0>
<CFSET newid2 = 0>
<CFELSE>
<CFSET newid2 = newID.newid >
</CFIF>

<cfquery name="updateMain" datasource="#dsn#">
Insert INTO TLAApprovers (ID, Name, Unit, ApproverEmail, Status)
Values ('#newid2#', '#form.Name#', '#form.unit#', '#form.ApproverEmail#', '#form.status#')
</cfquery>
</CFTRANSACTION>

Open in new window

0
After upgrade from CF2016 to CF2018 getting "connection refused" error on open CSV file. SQL Server 2012. Windows Server 2012
It is working with CF2016 but not CF2018

     HTML Code Format  <PRE>Error Executing Database Query. [Macromedia][SequeLink JDBC Driver]TCP/IP error, connection refused. &lt;br&gt;The error occurred on line 40.</PRE> 

Open in new window


<cfset FilePath = "C:\home\mywebsite\wwwroot\test\countrycodeToDialcode.csv">
             <cfquery name="GetInternationalDialcode" datasource="dialCodes"
             cachedWithin = "#CreateTimeSpan(1, 0, 0, 0)#">
                           SELECT *
                           FROM #filePath#
             </cfquery>

Open in new window

0
I manage a bunch of websites that mostly use Coldfusion. Each website is located in its own directory on the server and they all use the same version of the code and they each have their own database. I am trying to figure out what is the best way to update all of the sites when I make a change to the code. Right now I have created a directory on the server that contains the changed files and then I use directoryCopy to copy over the new files. My code looks something like the following:
<cfset temp = directoryCopy("_UpgradeCode","website_to_update_directory/",true,"*.*")>

Open in new window


One issue that I have is that I don't know if there were any problems copying over the code.

Can anyone suggest a better way to update websites? I am hoping that this can be done in an automated way so that I can just call a function or something and then it automatically updates all of the sites. I have created a list of sites to update that can be passed to the function.

Thank you for any help that you can provide about this.
0
I need to be able to push notification to users phone. I am trying to use ColdFusion to do that. However, I have issues. I found the site that supposed to explains how to do that with coldfusion .http://www.rickgroenewegen.nl/?p=77

However there is still some problems . If I doing thing on the fly I do not know what their phone type is (apple or android).
0
I have a form that allows for multiple file uploads using the "multiple" attribute on an input type="file" field. The results are being passed to a cfc that should upload the files, resize them, crop them for thumbnails, etc.

I have the photoUpload argument of the cfc (the name of my field being photoUpload) set to type=any, because if you upload a single file it's passed as a string while multiple files are passed as an array. My question is how to tell the code that comes after if there's one file or many. Should I test to see if photoUpload is a simple value, then if it is do ListToArray and just "loop" over the one? Or is there a better way to handle this before it even gets to the cfc?

Additionally, when I loop over the array it's always giving me the last file name as the name, causing overwrite issues. Can you tell where I'm going wrong? (Ignore all the CFCATCH messages being returned with the message, that's just for my own troubleshooting.) It's similar to this question but she had multiple fields and loops.

<cfif IsSimpleValue(ARGUMENTS.photoUpload)>
			<cfset photoArray = ListToArray(photoUpload)>
		<cfelse>
			<cfset photoArray = ARGUMENTS.photoUpload>
		</cfif>
<!--- upload image(s) --->
		<cfloop from="1" to="#ArrayLen(photoArray)#" index="i">
			<cftry>
				<cffile action="upload" 

Open in new window

0
MacOS Sierra plug-in configuration a qualified success.  However, I have no CFB perspective.
Install log says:
Installation: Successful with errors.
 
6454 Successes
0 Warnings
2 NonFatalErrors
0 FatalErrors
 
Non fatal errors being two occurrences of
Modify Text File - Single File:   /Users/barrygbrunning/eclipse/java-oxygen/Eclipse.app/Contents/Eclipse/Eclipse.app/Conten ts/Info.plist
                          Status: ERROR
                          Additional Notes: ERROR - Unable to locate ASCII text file to be manipulated. Deferring...
 
Indeed there is no such file, whereas there is a file /Users/barrygbrunning/eclipse/java-oxygen/Eclipse.app/Contents/Info.plist.  At the install log errors referenced path /Users/barrygbrunning/eclipse/java-oxygen/Eclipse.app/Contents/Eclipse/ are located folders: configuration, droppins, features, jre, plugins, readme and the eclipse.ini file, but no info.plist.
 
The implied "Deferring..." action seems to have not happened.  Any suggestions as to what I might do to recover the situation?  What should have happened to an info.plist somewhere? How might I get the CFB perspective to manifest in Eclipse?

Adobe_ColdFusion_Builder_2016_Instal.log
 
Any help will be greatly appreciated.  Thank you.
0
I am trying to convert some coldfusion code to jsp and there are some tags like cfargument,cf:loop,cf:return,cf:location.. can anybody tell me what to use in place of these tags in jsp?
0
Become a CompTIA Certified Healthcare IT Tech
LVL 12
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

I have a search (with drop downs and input boxes) and results page using ColdFusion and Access. Displayed on the results is a link to a new search page with some criteria automatically filled for the user, and will click on the submit button to view the results.

Note: the search and results are on one page of code

How can I alter my link to automatically submit to view the results in lieu of having the user click submit?
Link code:
<a href="Search.cfm?RE=#RE#&JU=#JU#&SE=#SE#" target="_blank" ><font size=3>#RE#-#JU#-#SE#</font></a>

Open in new window

0
I am trying to create a simple HTML table and for some reason the columns in the header are not the same width has in the body. My code looks like:
	<table class="table AdTableStyle1 ManageSched" id="UserSchedule" border="1" cellpadding="4" cellspacing="0">
		<thead>
			<tr>
				<th >Day</th>
				<th >Date <span style="font-size:10px">(mm/dd/yyyy)</span></th>
				<th >Start Time</th>
				<th >End Time</th>
			</tr>
		</thead>
		<tbody>
			<cfloop index="thisRow" from="1" to="#arrayLen(sched.data)#">
				<cfoutput><tr>
					<td>#sched.data[thisRow].day#</td>
					<td>#sched.data[thisRow].date#</td>
					<td>#sched.data[thisRow].starttime#</td>
					<td>#sched.data[thisRow].endtime#</td>
				</tr></cfoutput>
			</cfloop>
		</tbody>

	</table>

Open in new window

Capture.PNG
0
Hi

We have a computer with Coldfusion on running website on a localhost. I tried to add a new website but by doing this I now cant connect to any local website.

I've clearly done something wrong but I dont know how to fix it.

Can anyone guide me into a repair

Thanks
Mark
0
CFGRID runs into JSON Parse error while fetching data. However, sometimes 20K records come back in the grid while at other times, the error would display for 700 records.
0
In a.cfm I have:
<CFSET VerObj = New cfcomponents.VerFold.Ver_Users()>
<CFSET VerObj.Functiion_1(userid)>

In the next few template, c.cfm, I need to call a different function within Ver_Users.cfc I can do the same thing:
<CFSET VerObj = New cfcomponents.VerFold.Ver_Users()>
<CFSET VerObj.Function_2(userid)>

If I need to call the same cfc again from yet another template down the road and I keep doing this I think it is very awkward and repetitive? the purpose of using .cfc is so that I can reuse or call the functions by just doing:

<CFSET VerObj,Function_1()> or
<CFSET VerObj,Function_2()>

from anywhere without keep instantiating the cfc, am I correct? is there any example on how I can accomplish This?
0
Has anyone implemented SAML 2 using Coldfusion?

We would be the service provider and the identity provider for a single sign-on (SSO).

Seeking any sample code, CFC or anything to help jump start the project!

Thanks
0
The following script is producing invoices.  It was working fine in 4.5, but my server has upgraded to CF 7.0.  The first invoice is produced, and then I encounter the error,  I have removed all addresses from the database except for the 20 or so valid ones from people who bid in the auction.  I am not a CF expert, and I am freaking out a little bit.

Here is the code:

<html>

<head>
<title>SEND INVOICES</title>
</head>

<body BGCOLOR="#FFFFFF">

<CFIF ParameterExists(ID) IS "NO"><CFSET ID=0></CFIF>
<CFIF ParameterExists(PASS) IS "NO"><CFSET PASS=0></CFIF>
<CFQUERY name="validate" DATASOURCE="DJS">SELECT * FROM ADMIN WHERE ID='#ID#' AND PASS='#PASS#'</CFQUERY>
<CFIF VALIDATE.RECORDCOUNT is 0><CFLOCATION URL="ERROR.CFM?ERROR=2"></CFIF>

<CFQUERY name="checkclose" datasource="DJS">select * from times where type='auction'</cfquery>
<CFIF #checkclose.enddate# LT #CreateODBCDateTIME(now())#>
<CFQUERY NAME="AUCTIONINFO" DATASOURCE="DJS" MAXROWS="1">SELECT * FROM TIMES</CFQUERY>

<CFQUERY NAME="lots" DATASOURCE="DJS">SELECT * FROM lots ORDER BY lot ASC</CFQUERY>

<CFLOOP QUERY="lots">

<CFQUERY name="highbidder" datasource="DJS" maxrows="1">SELECT * FROM bids WHERE lot = #lot# ORDER BY bid DESC</CFQUERY>

<CFIF HIGHBIDDER.RECORDCOUNT IS NOT 0>

<CFQUERY NAME="HBI" DATASOURCE="DJS" MAXROWS="1">SELECT * FROM MEMBERS WHERE MEMBERID='#HIGHBIDDER.MEMBERID#'</CFQUERY>

<CFQUERY NAME="CHECKTABLE" DATASOURCE="DJS" MAXROWS="1">SELECT * FROM WINTABLE WHERE …
0
Hi,
I currently use a cfdiv to bind to a data file (data.cfm).
This data.cfm file simply creates a CFquery and a html Table..

When I use ColdFusion.Navigate I can refresh the above div (called div1) easily.

However I have changed m CfDiv into a std html div and I am trying to use the $ajax.load function to reload the div.

I believe my calling code is correct.

 $('#div1').load('data.cfm?id=100');

However it seems jquery just ignores the server side code in my data.cfm file.
If I makes a blank data.cfm with a few lines of html the do refresh ok.

But not my data.cfm with what I need.
cfquery and cfoutput & table.

Any help would be appreciated..
0
I'm trying to integrate a coldfusion app with MS sharepoint. Both sites are within the intranet so it shouldn't be anything network related. I'm able to browse to the wsdl file from a browser but the cfsharepoint tag part gives following error:

Unable to read WSDL from URL: https://nri.pcd.com/books/authors/_vti_bin/Lists.asmx?wsdl.

***********************************************************************************
Here's my cf code snippet:
***********************************************************************************
<cfscript>
      login = {domain="https://nri.pcd.com",
      username="uname", password="pwd"};
</cfscript>

<cfoutput>
      
            <cfsharepoint action="getlistcollection"
                  wsdl="https://nri.pcd.com/books/authors/_vti_bin/Lists.asmx?wsdl"
                  login="#login#"      name="result">
</cfoutput>

<cfdump var="#result#">
0
Bootstrap 4: Exploring New Features
LVL 12
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

I have a JSON feed which dumps a Facebook Page timeline feed. For some reason, Facebook allows a linked URL to be part of the actual message that is sent via JSON. So if I had a FB post that included a link to a Youtube video, it comes through the JSON feed like

'check out my cool new video http://www.youtube.com/myvideoid'

I'd prefer to strip out the url string from the JSON result and have it just give me

'check out my cool new video'

I know this has something to do with ReFindNoCase() or another similar thing, but I don't know how to write the code to strip it out and just leave me the message without the long url string.
0
Currently we are migrating from coldfusion 6 to coldfusion 2016.

<cfloop index="RSG004_i" from="1" to="#RSG004_dt.num#" step="1">

I want you to tell me how to deal with this error.
Thank you.
0
We are looking to upgrade our coldfusion server (v 6.1) running server (2003) to a new server (server 2012) and ColdFusion 2016.

Looking for a solution/upgrade path.. If I need to upgrade first to a lower version.

If its not semi simple then possibly moving to another dev language.

Thanks in advance!
0
I've been using  sys-con.com's code in my Application.cfc file to check for malicious input through FORM and URL variables, but I'm running into issues with hyphenated variable names (specifically Google's reCAPTCHA.) This is the code I use:

<cfloop collection="#form#" item="formelement">
    <cfif isSimpleValue(evaluate(formelement)) AND refindnocase(sqlregex, "#evaluate(formelement)#")>
        <cflocation url="messages.cfm?message=invalid">
        <cfset StructClear(form)>
	<cfabort>
    </cfif>
</cfloop>

Open in new window


And this is the error I'm receiving:

Variable G is undefined.

Which makes sense, because it's looking at g-recaptcha-response. What do I need to do to my code to allow it to accept hyphenated variable names?

Thanks!
0
i m not able to access ColdFusion pages and admin page in our application. It is throwing 500 error with ROOT CAUSE:
coldfusion.server.ServiceFactory$ServiceNotAvailableException: The Debugging service is not available.

I m getting below info in the logs when starting CF server. We are using CF9 on unix server. Please help.

04/26 05:02:19 Information [main] - Starting scheduler...
04/26 05:02:19 Information [main] - Starting WatchService...
04/26 05:02:19 Information [main] - Starting debugging...
coldfusion.server.ParsingConfigFileException: [/export/home/web3b2/coldfusion/coldfusion9/lib/neo-debug.xml]coldfusion.wddx.WddxDeserializationException: WDDX packet parse error at line -1, column -1. Premature end of file..
      at coldfusion.server.ServiceBase.doDeserialize(ServiceBase.java:151)
      at coldfusion.server.ServiceBase.access$000(ServiceBase.java:37)


04/26 05:02:19 Error [main] - Unable to initialize Debugging service: coldfusion.server.ServiceException: [/export/home/web3b2/coldfusion/coldfusion9/lib/neo-debug.xml]coldfusion.wddx.WddxDeserializationException: WDDX packet parse error at line -1, column -1. Premature end of file..
0
Dear Guys,

I am having issue on protocol in Adobe ColdFusion application. I tried changing it manually on applicationlib.cfm file, but its not reflecting on the browser.

Do I need to build the application after making changes or any other method need to be followed?

Please help on this.
0

ColdFusion Language

10K

Solutions

3K

Contributors

ColdFusion is a server-side rapid application development platform originally created by Allaire and now sold by Adobe, implementing the dynamic general purpose CFML programming language. The term ColdFusion is sometimes colloquially used to refer to the CFML language (Cold Fusion Markup Language), but can also include discussions of the server software implementation. ColdFusion runs using a customised version of Apache Tomcat. Earlier versions are bundled with JRun.

Top Experts In
ColdFusion Language
<
Monthly
>