The official community for ColdFusion.
Recently active
Hello community, first of all, for all of you in US, happy 4th of July!I am having an issue I need some help with: I need to connect to an sFTP server, retrieve the list of XML files (files will be placed there for CF to do something with them) and then loop through the contents of these XML files and insert the values into a database.This is what I do: I open the connection and ask for the list of files using CFFTP. That works perfectly. Now, when I use xmlParse() to retrieve the XML content, when the file is in this sFTP server, I get the error "Content Is Not Allowed In Prolog". If the same file I place it on my own website for testing, then contents are shown without any issue.From the image, is line 30 where I tell CF where the file is located.I have tried BenNadel's post about this issue (Content Is Not Allowed In Prolog - ColdFusion XML And The Byte-Order-Mark (BOM) ) but didn't work. Using this suggestion the error says "Premature End of File".The XML file I am testing with is
Hello all,I am a newbie to ColdFusion and got stuck in an exercise.I am having a form where the user picks a file.<cfform action=""> <cfinput type='file' accept='.json' name="choosefile"><br> <cfinput type="submit" name="loadData" value="Load JSON data"></cfform>Now i want to read the data from file upon submit.<cfif isdefined("form.loadData")> <cffile action="read" file="#form.choosefile# variable="jsondataFromFile"> <cfdump var="#jsondataFromFile#"><cfif>Now when i run the code i get FileNotFoundException because ColdFusion is searching for file chosen in temp directory.How do i read the file?Please help. Thanks in advance!
Each time the operating system is patched the RESTful services must be recompile or they throw errors when accessed. Version is CF 2018 on Windows 2016 server.
Hello, all,We recently applied the most recent patch for CF11, and now we are being flooded with alert emails that a variable named "qRead" is undefined.This is happening in a CFC function that gets distinct years from a database for news articles. <cffunction name=icleYears" output="false" access="public" returntype="Query" > <cfset qRead = "" /> <cfquery name="qRead" datasource="news_2016" cachedwithin="#CreateTimeSpan(0,0,10,0)#"> SELECT DISTINCT TO_CHAR(TDATE,'YYYY') articleYears FROM &nb
Hi Everyone,I have installed CF 2018 on Centos 7 and when I started the web connector creation I got weird results:mod_jk.so and workers.properties files were created in /etc/httpd/conf folder.My previous experience with CF 2016 is that those files should be in cf_root/config/wsconfig/{magical number} folder. Is it something new with CF 2018 that moved those files to /etc/httpd/conf or I am doing something wrong?The command I have used for connector creation is:/opt/coldfusion2018/cfusion/runtime/bin/wsconfig -ws Apache -bin /usr/sbin/httpd -script /usr/sbin/apachectl -dir /etc/httpd/conf/ -vor even this one does the same:java -jar /opt/coldfusion2018/cfusion/runtime/lib/wsconfig.jar -ws Apache -bin /usr/sbin/httpd -script /usr/sbin/apachectl -dir /etc/httpd/conf -vBack in CF 2016 file structure was:/etc/httpd/conf contained httpd.conf, magic and mod_jk.conf/opt/coldfusion2016/config/wsconfig/1 contained mod_jk.so, uriworkermap.properties and workers.propertiesPlease advise,Thanks!
Hi Guys,Trying to add REST resource but getting this error below form admin page -->Rest Resource. Can someone help me on this issue?Error","http-nio-8500-exec-1","07/02/19","18:06:44","cfadmin","The request has exceeded the allowable time limit Tag: cfoutput The specific sequence of files included or processed is: /opt/coldfusion2018/cfusion/wwwroot/CFIDE/administrator/extensions/restwebservices.cfm, line: 61 "coldfusion.runtime.RequestTimedOutException: The request has exceeded the allowable time limit Tag: cfoutput at coldfusion.tagext.io.OutputTag.doStartTag(OutputTag.java:92) at cfheader2ecfm1237343596.runPage(/CFIDE/administrator/header.cfm:61) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:262) at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:729) &
Hello, we're using Coldfusion and SQL and are trying to make a page with a query with only one table with one row and need it to force a page break after so many rows for example 50. We could also have it force a page break after 8x11 page is filled. I'm using a header and it will never show the header (theas) on page 2 sense it can't figure out where the page break is. Any help would be great.<head><script>thead {position: sticky;top: 0px;}</script></head><thead><table width="100%" cellspacing="2" cellpadding="0" border="0" align="center" bgcolor="#CCCCCC" contenteditable="false"><td bgcolor="#EDE9C6" width="5px"> <div align="center"><nobr><font size="-2">fmt</font></div> </td><td style="overflow:hidden;" bgcolor="#EDE9C6" width="23px"> <div align="center"><strong><font size="-2"> <nobr> &
Hello, all,I've got a CFC that accepts an AJaX submitted form that has been converted to JSON, converts it back into a form, does form validation, and then puts everything into an Excel spreadsheet. Been working flawlessly for years.I'm in the middle of changing the CAPTCHA, and suddenly I'm getting a 404 error in response.Diagnostics: Failed to add HTML header. ColdFusion was unable to add the header you specified to the output stream. This is probably because you have already used a cfflush tag in your template or buffered output is turned off. The error occurred on line 352.Line 352 of the CFC is:returnSOrigin &= "<p style='margin:0 20px; text-indent:-20px;'>POE for Shipment Origin for Cargo #val(sdLoop)# does not exist in form.</p>" & application.crlf;There is no CFFLUSH being used _anywhere_ in this process. It was working on Friday, now this. Any thoughts?V/r,^ _ ^
Hello, all,I've got a problem with CFIMAGE that I could use some wisdom with.We have a page that has a query that pulls article data from a content table and it uses a LEFT OUTER JOIN to pull media (pic or video) from a media table.When displaying the article, if there is an associated image we insert the BLOB into an ImageNew() tag, resize it, and then display it. Except it's not displaying. We just get the ALT content. Inspecting the source via browser, I can see where the CF generated IMG tag is, but there's no picture.<cfoutput query="getarticlesbyyear">... <cfif photoID neq ""> <cfset myImage = imageNew("#thumbnail#") /> <cfset imageResize(myImage,"150","","bilinear",2) /> <cfimage action="writetobrowser" source="#myImage#" title="#caption#" alt="#captio
Refer: https://verify-email.org/home/api I want to use their API to get a result back to see if an email address is valid. So based on their documentation, I guess I do (something like) the following?<cffunction name="email_verify" access="remote" returntype="string"> <cfargument name="email" type="string" required="true"> <cfoutput><cfhttp url="https://app.verify-email.org/api/v1/my key/verify/#arguments.email#" result="variables.resultxml" /></cfoutput><cfset variables.parsed_result = xmlParse(variables.resultxml.fileContent)> <cfreturn variables.parsed_result></cffunction>The above syntax is obviously wrong as I am getting a console error An error occurred while parsing an XML document. What am I doing wrong?(I tried without the <cfoutput> w
have a specific query that for unknown reason takes >20sec to load from a CF page but it's instant when ran directly on mssql studionotes (Datasource=db2, Time=39320ms, Records=20) in @ 08:05:54.054SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SELECT TOP 20 id,productId,itemID,createdOn,message,createdBy,comments,manual,logType,qty,dataid,qtyOnHandAdj FROM inventoryLog WHERE itemid = ? AND logType <> 9 ORDER BY createdOn Desc Query Parameter Value(s) -Parameter #1(CF_SQL_INTEGER) = 40483i played around with the TOP N. ONLY TOP 20 takes long. TOP 19,21,25,50 whatever all take millisecondsi played around with column list. if i exclude the dataID column, it's instant. if i alias dataID as something, it's instant.if i alias dataID as dataID, it's instant.so it's only bad when TOP 20 and dataID without alias. in CF2018 update 4
I am trying to install ColdFusion 9 on Windows Server 2016 (x64) this is a development server. I read that I needed to run in compatibility mode (Windows 7) for the x64 install so I did that; the installer initialized and it opened but them immediately closed. Has anyone else had this issue? Any recommendations would be greatly appreciated.
Not specific to CF, maybe Javascript or Jquery ... looked everywhere on google and found nothing. So I am on a web site the other day and in addition to being able to upload your government issued photo id, you could also say cheese and have your built in laptop web cam take your photo. How do you do that? What library tool?
Hello, all,Has anyone else had any issues using URL parameters with a CFINCLUDE?I've got something like:<cfinclude template="#app_base#common/thisfile.cfm?its=1" />app_base is a variable that sets the root depending upon what environment I'm in. In DEV, it's "/public/". In staging, it's "/preview/public/". In production, it's "/".I've got one page that is trying to use CFINCLUDE three times, so the its value changes with each include.But I'm getting error messages stating that "ColdFusion cannot find /preview/public/common/thisfile.cfm?its=1". It's there, I can see it in the FTP.Thoughts?V/r,^ _ ^
Hi All,We are migrating ColdFusion servers from 2008 to 2012 and using ColdFusion11 in the new server.When we are trying to access an application, the page does not load (it works fine in the old server). When we tried to debug the page for error in chrome, we got an error as data source not found, but the data source exists in CF Admin page. It is a shared server and we have multiple applications and each application has a separate CF Admin page.Kindly assist.Regards,Suresh P
These are the steps I use:1) I created new mapping inside CF Server => Server Settings => Mappinglogical path: /mysitedirectory path: /Volumes/drive2/work/mysite2) I restarted the server/Applications/ColdFusion2018/cfusion/bin/coldfusion stop && /Applications/ColdFusion2018/cfusion/bin/coldfusion start3) Using my preferred text editor, I created test.cfm inside /Volumes/drive2/work/mysite with the following contents<cfdump var="#CGI#">4) I then tried viewing the new file on my browser vialocalhost:8500/mysite/test.cfmI then get a 404 error. Exact message goes like "coldfusion.runtime.TemplateNotFoundException: File not found: /mysite/test.cfm"I checked these 2 things:I verified that /Volumes/drive2/work/mysite is readable by everyone (755 permission)I verified that /Volumes/drive2/work/mysite/test.cfm is readable by everyone (644 permission)Other than creating the mapping, the other configurations I've changed are:Created datasource for my appEnabled deb
We are starting to move our site over to ColdFusion 2016, and I noticed that the cfinput datefield type is broken. When the page loads it tries to reference YUI javascript assets that are apparently now deprecated and no longer come with ColdFusion.I don't see anything in the documentation about the datefield type being deprecated, so I'm not sure if the documentation is incorrect or if there's something wrong.
I am rendering web pages exclusively using AJAX content. One "object" I cannot get to work is Google maps. Everything else is contained within a .cfc component and cfsavecontent. Using this method I can only put a static map image. Anyone know if / how to insert a dynamic map using this method?Either using CFMAP or a javascript / jquery equivalent. I've tried both.
I am using ColdFusion 9 and I have XSS issue when i run security scan. I would like to install encoder-1.2.jar file into Coldfusion. Is there any suggestion or direction to install and use that library?Thank you!
Been using CFBuilder for a while and cannot figure out HOW to stop it from autocompleting.Specifically ... <cfif> it adds the </cfif> I found a couple of setting that appear to control it but it still insists on auto completing! ARGH!And then it gets really stupid when it finds a <input> within the <cfif> and tries to add </inoutIt also adds ] to [ ) to ( # to # so you get ##I wish CF Studio was compatible with WIndows 7 and 10?I must be missing the obvious!?
After upgrading to CF10, we are having issues getting our server to properly recognize any mimetype associated with the .xls file extension. For some odd reason, the server is viewing them as a word file type and rejecting it. When we upload a file with the .xls extension, the server responds back with the following error message:"The MIME type or the Extension of the uploaded file application/msword was not accepted by the server. Only files of type application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet can be uploaded. Verify that you are uploading a file of the appropriate type. The error type is Application."Our only workaround for the time being is uploading all files in the newer .xlsx format, which the server properly accepts. As you will see from the above error message, those are the mimetypes I have thus far. The other work around is updating the
Hello,We have a ColdFusion application that is currently using Oracle Authentication Manager (OAM) for logging people on to the application. In the application there is a link titled "Log Off". We have been instructed by our management stop using OAM. I have now got the application so that they are logging in using Citrix Netscaler to login in to an Internet explorer window that is exclusive to this application and the login process is working correctly. However when the "Log Off" link is clicked it is currently still redirecting to OAM for the Log Off process. This is confusing as the users are not logging in using OAM and, in the near future the OAM servers will be going away.What I am trying to do is have the logoff page just close the internet explorer window when users click it. After doing some searches on this I have tried modifying the logoff.cfm Page to the following. (Other then a header comment this is the entirety of the logoff.cfm page)&
I have a form that many people share. If more than one person uses it, their data is overwriting the next persons.I am working on a new page that will lock all other users from being able to submit data if another person is "logged" on to the page.The logged in user will get kicked out after three minutes of inactivity.The concern is, you may update several of the fields, get interrupted by a phone call, then get redirected to the home page and lose your data.If I have it redirect to the submission / processing page, will it take the form data with it, then I can send them to the home page?Please keep in mind, I am not a programmer, so I know there are likely many more elegant ways to resolve this.Thank you
We are trying to execute a cfinclude determined by screen width on our responsive website. This if for determining the number of ads that will appear on the page (we want to show a fixed number on screens of 700px or less). We are using Cold Fusion 9 so we can't utilize CF 11's detectDevice function. We realize we can't just use media queries to show or hide the appropriate cfinclude because this will not prevent CF from loading unnecessary ads in the background, it will just hide them and our page speed will be affected. Is Javascript the only way to do this? If so, can someone provide an example without Jquery?
Hi, I'm running CF 2018 on a Mac and trying to change the location the default wwwroot to a folder elsewhere in the system. Previously this was done by editing the server.xml file, but its not having the intended effect. The server.xml file reads as follows: <Context path="/" docBase="/Applications/ColdFusion2018/cfusion/wwwroot" WorkDir="/Users/bigMac/Dropbox/Apps/wwwroot" > <Resources> <PreResources base="/Applications/ColdFusion2018/cfusion/wwwroot/CFIDE" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/CFIDE"/> <PreResources base="/Applications/ColdFusion2018/cfusion/wwwroot/WEB-INF" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF"/></Resources> </Context>Any insights appreciated.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.