The official community for ColdFusion.
Recently active
Hello everyone, I'm trying to read CSV file and output with ColdFusion. I store all records in array and I have to pull out just first and last column with all records. My current code gives me just a row with all columns. Can anyone help with this please? Here is my code:<cffile action="read" file="#ExpandPath('Status.csv')#" variable="myfile"><cfset myarray = ListToArray(myfile,chr(13))><cfset cnt = ArrayLen(myarray)><cfloop index="index" array="#myarray#"> <cfoutput> #index# <br/></cfoutput></cfloop>
I have a report that I create with Coldfusion, that includes a number of CFChart objects. I recently installed a new SSL certificate, and now all the charts show up as broken links. It shows up fine if I try and display this as HTML. On the chance it was something weird about my (lengthly) report, I created the following sample code that I saved in a file called foo.cfm:<cfset sDir = "C:/"><cfset filename = "foo123.pdf"> <cfdocument format="pdf" filename="#filename#" overwrite="yes" marginleft=".7" margintop=".3" backgroundvisible="yes">TEST 12345 <br><br> <div style="height:500px;float:right; margin-left:10px; margin-top:10px; margin-right:10px; margin-bottom:10px;"> <cfchart format="png" chartwidth="400" chartheight="360" showborder="n
Hello everyone,I'm working on my project and I have a problem looping through my array. As many of you know arrays in coldfusion start at position 1, inmy case if I put that my cfloop starts from 1 I'm getting an error because that does not match my array. Here is my sample of code:<cfloop index="i" from="i-1" to=#(cnt)# step="1"> <cfset myrow = #replace(myarray,chr(10),'')#> <cfset myrow = ListToArray(myrow,",",true)><cfoutput> (#myrow[1]#), (#myrow[2]#) <br/></cfoutoput></cfloop>Does anyone know how I can fix this problem? I tried to use array in my loop but I got another error with that option.Thanks in advance for any advise.
I am new to CFB and am struggling to get it set up to work with virtual hosts on my local development server.Here's the setup;Windows XPApache 2.2 (using virtual hosts)CF 11RDS enabledCF Builder 3I can get CFB working with RDS, Debugging, etc when I disable virtual hosts. However, as soon as I try to use it with virtual hosts I cannot get RDS and debugging to work.Below are screen captures of my CFB server setup.
Hi everyone. I have a select box with part numbers that you choose first, and depending on which part number you choose, some input boxes display to enter measurements into. Then you click Submit and it outputs the info. into a table that has some calculations it does first. This works just fine if I use just one input box for each part number. It even works when I have 2 input boxes. If I go through and do everything the first time, it works just fine. The problem is when I try to choose a different part number, I get an error. It's saying that "" can't be converted to a number on my X value. I'm assuming it would say the Y Value too if it would get that far. Does anyone know why this is happening or how to fix this? Here's my code:<cfif NOT isDefined("form.submit")><cfif isDefined('form.PartNumber')><cfset page.select_Part = form.PartNumber></cfif><cfif isDefined('form.X')><cfset page.select_X = form.X></cfif><cfif isDefined('form.Y')>&
I am running CF 10 on Redhat Linux 6 and everything was working fine until recently, but now I cannot get CF to start up. I had created a datasource to connect to a unidata database and it was not working, so I needed a newer version of the database driver. I got the new version of the driver (the 2 files needed for the driver are unijdbc.jar and asjava.zip). I placed the files in the location where I've always placed them while using CF 8:/opt/coldfusion10/cfusion/wwwroot/WEB-INF/classes/unijdbc.jar,/opt/coldfusion10/cfusion/wwwroot/WEB-INF/classes/asjava.zip,"%CLASSPATH%"and set the class path in the CF Administrator accordingly, then stopped and started CF, and it came up fine, but the datasource to unidata would not verify (see my other recent forum post) -- in reply to that post, someone had recommended I put the drivers in a different location, so I did that, and set the classpath accordingly:/opt/coldfusion10/cfusion/runtime/lib/unijdbc.jar,/opt/coldfusion10/cf
I had a stable working CF11 environment running on Server 2008R2, with several Scheduled Tasks running using https urls. As far as I know, nothing has changed, except the SSL certificate for the domain seems to have been renewed.If I manually run the tasks via the CF Admin, the message says the task ran successfully - it didn't. I have them set to log the result, and the text file says Connection Failure. I even tried to run the same https URLs from another CF server, nope. I can execute the https URLs from a browser successfully.I have followed the instructions for adding the new cert to the keystore. I actually did it via CertMan (a really cool CF plugin for CFAdministrator which lists all the stored SSL certs and enables you to install others), and via the keystore command prompt. Still doesn't work.Help!
Hello, we have the following issue. I have logged a bug in Adobe database but wonder if anyone else encountered this issue and/or have any ideas how we can go around it? ThanksWhen attempting a secure FTP connection to unix ftp server, cfftp fails to recognize that the connection failed on unix system (with "Timeout before authentication" error) and the cfftp request just keeps spinning until ColdFusion is restarted (request cannot be killed in Server monitor). FTP log shows one line that FTP request of action="open" was attempted and no other log files have any other information. Bug#3999633 - CFFTP secure requests just keep spinning without giving an error when connection fails
Hi, I have two tables T1 and T2 of same structure at two different sql servers.T1 has 1,00,000 records and T2 has 99,000 records. Is it possible to copythe extra records(1000 records) from table T1 to T2 which are not present in T2. Read about linked server. Is there any other alternative ways?Thanks
Hello, all,I'm trying my first attempt at using CFMAP on a CF11 Server (Ubuntu 14), and I'm hitting a snag.For some reason, the CFMAP is hiding some of the text on this page. I've got two images that I'll upload; one of the page demonstrating the hiding of the text, and one of the text highlighted.I am using skeleton as a responsive design library, if that has anything to do with it.What could be causing this?V/r,^_^
I need some help with an error that keeps coming up in the application.log.The message is:Aug 28, 2015 1:42 PM Error ajp-bio-8014-exec-1 PACT Authentication has failed.Please check the logs for more details.s The specific sequence of files included or processed is: C:\inetpub\wwwroot\PACT\index.cfm, line: 3What does Authentication has failed? It say to check the log files, but this is a log file so that is no help. I have looked in the other logs, but I don't see anything that would correlate with this error. This is happening several times an hour across all the sites on this server.Virtual serverI am running ColdFusion 11 Enterprise editionWindow 2008 r2 serverThis is a new server set up. I had all my sites loaded on this server for testing and did not get these errors. Once I made this server available to the public, then I started getting this error.It appears the sites aren't going down. So the user isn't affected, but I want to know what is cau
I have recently inherited a directory of ColdFusion code developed in Dreamweaver. After downloading the source from svn into a local development directory, I attempted to follow the instructions I found in several places online for Importing a Dreamweaver site into a project, using the Existing Folder as New Project option (since it was never previously a CFBuilder project, just Dreamweaver), I assigned the CF Nature to the root in the Navigator window. However, when I attempt to drop the tree below the root, no files appear - and the little > arrow is even gone, as if there are no files.What should I be looking at here? Obviously it lacks something that tells it all the files in the project. It is odd, because when I select the root of the directory where all the source files are "ZZZ Master Website", it creates another directory INSIDE that directory, also called "ZZZ Master Website". That's where the .project and settings files show up. I feel like I'm missing something.FWIW, I'
Hello, all,The boss has given me the green light for getting rid of Portcullis in favor of ESAPI. GREAT!!But all the documentation I've been looking at isn't really helping me to implement it.What we did have set up with Portcullis was in Application.cfc. During the onRequestStart(), it checked to see if Portcullis was defined (init it if it wasn't), then passed URL and FORM scopes to Portcullis for scanning. If Portcullis found something that shouldn't be there, it redirected to the home page.I'm leaning towards using ESAPI for sanitizing input, not detecting and redirecting. Is there a way to set ESAPI up to scan entire FORM or URL scoped values within the Application.cfc? Or am I doomed to going to every form processing page and adding the sanitization to every form or url value?V/r,^_^
Hello, all,Is anyone else, here, using the Portcullis CFC??I've got a form that is submitting via AJaX, and as long as I have JavaScript stripping out malicious code, it works great. But if I disable the client-side validation/sanitization and allow Portcullis to detect malicious code, Portcullis is set to redirect to the root index page if it detects anything. (I have further server-side validation/sanitization, in case JS is disabled.)Since my form is submitted via AJaX and uses output to display error/success messages to the DOM, Portcullis is loading the main page as the content to display within the DOM of the form page!!I do NOT have the option of disabling or otherwise skirting using Portcullis. I've tried modifying the Application.cfc to check the cgi.http_referer - if a particular page is the referrer, don't redirect. It's redirecting, anyway.Any solutions to this without disabling Portcullis?V/r,^_^
The task is created when a page is manually loaded via a ColdFusion page. We've used the same process for about a year now without incident (and I can't repeat the error now...). The code also checks a database field to make sure the email hasn't already been sent - it got through that as well somehow.Here are the logs (I assume the ordering here is off since it all happened at the exact same time). It looks like it fired off 3x before it got the "Unable to store Job" error:Jul 23, 2015 12:03:58 PM Information [DefaultQuartzScheduler_Worker-1] - Task DEFAULT.Blaster triggered.Jul 23, 2015 12:03:58 PM Error [ajp-bio-8012-exec-1] - Unable to store Job : 'SERVERSCHEDULETASK#$%^DEFAULT.BLASTER', because one already exists with this identification.Jul 23, 2015 12:03:58 PM Information [DefaultQuartzScheduler_Worker-1] - Starting HTTP request {URL='http://localhost:80/emailcampaigns/email.cfm?sendemails=true&RequestTimeout=90', method='get'}Jul 23, 2015 12:03:58 PM Error [ajp-bio-8012-exe
Hi. I am trying to encrypt an ItemID so the user doesn't see the actual ItemID in the address bar. I have 2 encryptions. One is being used on an Edit page. This one works just fine. But when I try to use it on an Add page, it doesn't work. I get the error: Input length (with padding) not multiple of 16 bytes Below is the code I have on an ItemDisplay page and the link goes to my add or edit pages. I've also included what's on the Application.cfm page. We're not generating a new encryption code each time so the user will always be able to get to the link we send them in case our server needs to be restarted. I will also include the decryption code on the Add and edit pages. It's the same thing on both. Can someone tell me why it works on the Edit page, but not the Add page? Thanks.item_display.cfm<cfif Socket_App_ID Is Not ""><cfset encrypted_string = urlencodedformat(encrypt(Socket_App_ID, application.key, "AES", "base64")) /></cfif><cfif ItemID Is Not ""><cf
I have set up a site with custom authentication and form that uploads multiple files using <cffileupload>-tag. Everything works fine with Chrome and IE. But when I switch to FF, the upload fails.Both pages, the form containing <cffileupload>-tag and the page handling the actual upload, resides on the area which is authenticated. Authentication uses cookie data as part of the authentication method. As said, this doesn't cause any problem with Chrome or IE, but when I try with FF, the authentication method won't be able to read cookie data. The CFID and CFTOKEN are passed correctly though.I have tried reading documentation, to search Google and this forum, but I'm not quite sure where exactly problem resides. Is it that for some reason the FF's flash player can't access the cookie data and pass it along to the server, but in Chrome&IE flash is able to do that? I figured that as a workaround I could check if request is coming from my upload widget, and pass the cookie data
Au lancement de LR4 mes dossiers de photos sont marqués d'un point d'interogation bien que le disque externe (Drobo) soit bien raccordé à l'ordinateur.Que puis je faire ?Merci de votre aide
I attempted to upgrade my server to version 9.0.1 this weekend with less than spectacular results. The server is running Windows Server 2008, MySql 5 and ColdFusion9. I followed the instructions in the installation guide and stopped all ColdFusion, IIS and Anti-Virus services before starting the install. The install seemed to be going well but then decided to hang at a part where it mentioned copying the web-inf folder. After a 40 minute wait and no activity in taskmanger, I decided to try and cancel the installation. This of course also hanged up and left me stranded with my server down. After a reboot and several other attempts to get the upgrade to run through clean I decided to try to remove the upgrade by following the removal process. This eliminated the "datasource unable to be found" errors that plagued what was left of my ColdFusion installation but left me unable to get into my ColdFusion Administrator. I had to change the following line in the neo-runtime.xml file so that th
I am using CFHTTP to make calls to a REST API. Occasionally, the server that hosts this API crashes due to the calls we are making (this is a server inside our company's enterprise). When that happens, the CFHTTP calls cause the entire ColdFusion request to hang indefinitely, even when defining a timeout on the tag. This hanging continues to use up resources until eventually our server crashes. I need to find a way to protect our server from a failing CFHTTP call. I am at a loss as to what would cause CFHTTP to ignore a timeout attribute and am hoping for some insight here.Thanks,Tim.
Greetings,I want to populate a row in a spreadsheet using the SpreadsheetAddrows(spreadsheetObj, data[, row, column, insert]) function.CF9 documentation says for the data parameter can be "A query object with the row data or an array."My code SpreadsheetAddRow (exportSheet, #attributes.columnHeader#);throws the error, Complex object types cannot be converted to simple values.What am I missing here?Regards,Greg
Hi. I have a form for a user to type in a number into a text box. I want to allow them to enter whole numbers and numbers with 1 decimal place. If they enter a number with more than 1 decimal place, I want the form to stop from submitting, or pop up a window that says they have to enter a number with only 1 decimal place. Can this be done with Cold Fusion's validation code in the form, or does it have to be written in Javascript in order for this to work? I do have some javascript code below that I used on another page that allows 2 decimal places, but I cannot get this javascript to work. It pops up a window that says I need to enter 2 decimal places, but the form still gets submitted. How do I stop the form from being submitted until it is entered correctly? I don't understand Javascript very well. This is why I was wondering if there was an easier way with Cold Fusion's validation code instead? Here's the code that works, but doesn't stop the form from submitting:<script type="te
Two URLs:http://DOMAIN/zshowsession.cfmhttp://DOMAIN/institutes/office/zshowsession.cfmThe DOMAIN portion is identical. Same site. Same CF server.Both files contain this code:<cfdump var="#session#">One outputs this:The other outputs this:You can see it's the same cfid and cftoken, but the contents of session are different. This is causing me problems.Is anyone aware of any legitimate reason why this would be happening? Maybe some weird CF configuration in the CFIDE or something? I already checked the two relevant Application.cfc files (one in /, one in /institutes) and there is nothing that modifies the session.
Hi-I am trying to retrieve data into jqGrid but it seems that my data is not converted to json or maybe the case is something else. In short can't populate the jqGrid. My files are as followsUsers.cfm<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title><link rel="stylesheet" type="text/css" media="screen" href="steel/grid.css" /><link rel="stylesheet" type="text/css" media="screen" href="steel/jqModal.css" /><script src="js/jquery-1.11.0.min.js"></script><script src="js/jquery.jqGrid.min.js" type="text/javascript"></script><script src="src/jqModal.js" type="text/javascript"></script><script src="src/jqDnR.js" type="text/javascript"></script><script src="src/jquery.fmatter.js
Hi. I have 2 text boxes in a form the user can type numbers into. I just want to add the numbers they type in together and output the answer. I'm starting off simple and will get more complicated with my calculations later. I actually have the calculations working if they are entered into a database, but we need this to work on the fly depending on what the user typed into the text boxes.I am only able to set the text box values and output them, but I cannot get them to add together. I have some javascript that outputs what was typed into the boxes by using CFSet. Is this the way I should write this? Is there a way to condense the javascript, or do I need to separate each set of text box code out? Is there a different way to do this simple calculation with just Cold Fusion, or do I need the javascript to grab the numbers that are entered into the text boxes? Here's the code I have below. If you remove the CFset price and the output of Price, you'll see that this code outputs the X and
Remix with Firefly Community Gallery
Thousands of free creations to fall in love with and remix in Firefly.
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.