Design the future of fashion, win Firefly Pro 👗✨
The official community for ColdFusion.
Recently active
Hello, We have a Cold Fusion application running on Windows 2016/ using IIS , this application uses database users to login to the front-end. Roles are then granted directly through code to these database users. Its an old legacy application, we would like to change the method of logging in to use Windows Authentication and not a database users, how can this be done ? If we do this do we need to change a lot of code and how to grant roles once the users logins. Actually the system should directly let a user in since they are on the Intranet using Windows authentication. Any suggestions ?
On CF2016, when using SerializeJSON() to serialize a struct, string values like "true" would get converted to booleans in the JSON. While this could be considered a bug, serializeJSON() has always worked like this, and our code base (client side) is expecting the boolean value when deserializing the strings. Is there any way to enable the old behavoir for the entire app / server on CF 2018? <cfset x = {}> <cfset x.normal = true> <cfset x.normalStr = 'true'> // serialize and dump <cfdump var="#serializeJSON(x)#"> // on CF2016, we get a boolean value for normalStr {"NORMALSTR":true,"NORMAL":true} // on CF2018, the data type is preserved {"NORMALSTR":"true","NORMAL":true} I know I can set the metadata to preserve data types, but my code base is to large to find all the various nested structs and keys that would need to have meta data description. I'm looking for a way to make CF2018 serializeJSON() work like it did on 2016.
Currently, I am Using ColdFusion 2018, and trying to add a progress bar on an API call. So I created a cfc function to fetch this API details. For this I will call a "getStatus()" function through bind params. And able to load the cfprogress bar successfully. The problem is that I need to pass an en extra parameter to this getstatus function . Is it possible? Please see the code I used to load cfprogressbar <!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title></head><script type="text/javascript">function startProgress() {ColdFusion.ProgressBar.start("mydataProgressbar");};function onfinish() {alert("Done");};</script><body><cfif IsDefined("Session.STATUS")><cfscript>StructDelete(Session,"STATUS");</cfscript></cfif><cfset sjsondata = '{"name":"Jibin","id":"1234"}'><!--- For code simplicity, for
Here's a unique one. My only SQL statement on this page is:<cfquery datasource="#session.mix#" > Update Status SET AuthToken = '#Results.Auth_Token#', AuthTokenExpire = #AuthExpire# Where FID = '#key.FID#' </cfquery>When I execute it I get:[Macromedia][SQLServer JDBC Driver][SQLServer]Invalid column name 'NorthStatus'. The variable NorthStatus doesn't appear anywhere in the code for this page. I've RDP to the server and checked the code there too. It doesn't appear in the SQL table. It's a column that was long ago deleted from the table. If I update the SQL table and add a column NorthStatus the page runs fine and nothing ever changes in the column NorthStatus. Yes, it's a workaround but it makes zero sense. I've rebooted both the SQL server and CF server just for kicks. Anybody got a clue? Gary
ColdFusion 2018 Hope someone can help me figure out why GENERATEDKEY is not returning with the following query? <cfset dte = CreateDateTime(Year(Now()), Month(Now()), Day(Now()), hrs, mins, secs)> <cfquery name="A" datasource="#dns#" result="A">INSERT INTO Table (CustID,X1,X2,X3,SessionID)VALUES(#session.ID#,#X1#,#X2#,#X3#,'#session.sID#')</cfquery><cfset session.recno=#A.generatedkey#><script language="JavaScript" type="text/javascript">document.location.href='file.cfm'</script> The error that is returning is: Error Occurred While Processing RequestElement GENERATEDKEY is undefined in A. I have tried a lot of things including updating the JDBC driver.This used to work on an older version of CF.Thanks.
When I login to CF 2018 admin console and this shows up... The close button is not working, neither search nor close it. Restart WebLogic server and reopen console both are not helpful. How to fix this? I never have this issue using CF console before this.
I'm trying to use cfflush on a page that takes several minutes to complete. I'm doing something wrong because I still get a blank page for a few minutes then all at once I get the results. I've tried the example in the online docs and I'm not sure what I am doing differently. Here's an example of my code. cfflush interval = 5> <cfset count = 0> <cfquery name="c" datasource="blahblah"> Select CustomerID From Customer Where Customer like 'blah' Order by CustomerID DESC </cfquery> <cfoutput query="c"> <cfquery name="s" datasource="blahblah"> Select blah From Unit Where CustomerID = c.customerID </cfquery> <cfif s.recordcount NEQ 0> <cfset count = count +1 /> #s.blah#<br> <cfinclude template="/Connectback/CBChannelAPlaySchedule.cfm"> <a few more cfincludes> </cfif> </cfoutput> <cfoutput>#count#</cfoutput> Thanks,Gary
I am relatively new to working with JSON. I've had success with a few projects reusing the same code. On this particular one, the JSON data is returned differently and I could use some assistance on my deserialize code. This what I've been using:<cfset requestBody = toString( getHttpRequestData().content ) /> <cfset results = deserializeJSON( requestBody )>This is what I get back when I dump the reply: I assume my toString is looking at the wrong location for the response since the requestBody is empty.Appreciate any help!Thanks,Gary
I have a CFC method that uses a cfscript to define a structure that is initialized with details from a query and used to create an HTML output which is saved using <cfsavecontent>. The compressed html struct is then returned to the calling AJAX to render the output on the screen. I cannot post the code because of company policies but the url looks something like this : http://appurl/componenetName.cfc?method=methodname&returnFormat=json. Now during a security testing, the person replaced the json with 'abc' and it throws an invalid Return Format - which is totally acceptable, but - I want to show a general application Application error instead of the CF error. How and where do I catch this error? Will a cftry and cfcatch work? I tried defining error in the ajax call but I still get the error. I tried to use if,else to see if no input is passed to throw the error, but that still doesnt change the invalid returnType. Any help on this will highly apprecia
Guys , i have a coldfusion 2016 website running over IIS 7.0 . I want to ensure it is not suspitble to HTTP smugllingi want to enable HTTP 2 to resolve this issue .. Question : what all places i have to make changes to enable HTTP 2 ?1. IIS2. is there any setting in coldfusion 2016 process as well to enable HTTP 2? below is some reference material on what HTTP smuggling is :http://projects.webappsec.org/w/page/13246928/HTTP%20Request%20Smugglinghttps://www.youtube.com/watch?v=PFllH0QccCs Thanks
testing my post
1) I installed IIS with ALL features and subfeatures; 2) I created the hosts generic.lab and api.generic.lab in hosts file then I created the sites (one for host) in IIS using defaultAppPool:a) the generic.lab was located in D:\websites\generic.lab\wwwrootb) the api.generic.lab was located in D:\websites\generic.lab\SubDomains\api 3) I installed ColdFusion 2018 developer mode in C:\ColdFusion at port 8594 with ALL features and ALL updates (from 1 through 10), then I ran the IIS_connector.bat in C:\ColdFusion\cfusion\bin\connectors; 4) I enabled the “Allow REST Discovery” in ColdFusion Administrator > Server Settings > Settings > API Manager Section; 5) In api.generic.lab site, I wrote the web.config:<?xml version="1.0" encoding="UTF-8"?><configuration> <system.webServer> <httpProtocol>
1) I installed IIS with ALL features and subfeatures; 2) I created a host "api.generic.lab" using hosts file located in C:\Windows\System32\drivers\etc then a website "api.generic.lab" in IIS using DefultAppPool; 3) I installed the ColdFusion 2018 developer mode with all features in "C:\ColdFusion" and at port 8594, then I ran the IIS_connector.bat located in "C:\ColdFusion\cfusion\bin\connetors"; 4) I installed ALL ColdFusion updates (from 1 through 10); 5) In ColdFusion Administrator > Server Settings > Settings > API Manager Section I've checked "Allow REST Discovery" option; 6) I configuerd the web.config this way:<?xml version="1.0" encoding="UTF-8"?><configuration> <system.webServer> <httpProtocol> <customHeaders> &nb
I created a login page then using .cfm page to save the data and redirect the page to main site. We are going to use subdomain page for marketing and I have everything else going. I just can't keep user logged in when the redirect to the main site. I think the main site might be issue since its using javascript and php on main site. Here is the subdomain as well. https://2020.hotonhomes.com/landing.html Any ideas?
I have problem when trying to output characters like (⇒) (≈) (♦), Chinese words etc when using CFDocument. These characters were gone in the PDF output result. What is the better method to solve this issue.
Hi I was referred here by the Chat help.We seem to have issues with large spikes in response times and corresponding drops in traffic and as the JVM virtually hangs. This seems to be happening at “coldfusion.server.j2ee.pool.ObjectPool:checkIn” “coldfusion.server.j2ee.sql.pool.JDBCPool:checkOut “ and “coldfusion.sql.CFDataSource:getConnection” which can take a ridiculous amount of time. Our Data Centre people are adamant that there is nothing wrong with the Oracle Database (10g) side of things. JVM restarts can on occasion help, but not always. We are running CF10 HotFix 8, JAVA 1.7.0_60, with Apache 2.2.27 underlying.Response time vs call drop off.This reflects in very slow connection requests: We see a variety of timed_waiting and blocked threads during this time but nothing that indicates the source issue, with most being blocked on “coldfusion.server.j2ee.pool.ObjectPool:checkIn” Pool setting are as follows from CF Admin: Any advice on possible causes/solut
Our group has set up a ColdFusion Admin on a remote server. I have installed CF Builder 2018 on my PC. I am trying to connect to a SQL database which has been mapped on the remote server. I am in the RDS Dataview to access the data. I get an error 'Premature EOF encountered'. Is it possible to access the data on my PC from the remote server? What am i missing.
Trying to find a matrix or anything that describes which CFTAGS have equivalent CFSCRIPT counterparts? I was under the impression that all tags in 2016 have cfscript counterparts, however CFCONTENT and CFHEADER do not seem to have cfscript versions? A list of what is or isn't supported in cfscript would be ideal.Thanks.
Coldfusion Session Timeout:Been reading through numerous posts regarding this.sessiontimeout and how to adjust it depending on who/what is running. For instance, My users log in, and I want their sessions to end in 10 hours (I know, but I have people who don't do anything for hours and don't want to have to log back in). I have a program that runs, and I need those sessions to end in 5 seconds of inactivtity (or I end up with hundreds of sessions showing up on fusionreactor). Reading through the various articles, I'm getting mixed messages.So, my question....If I invoke a remote CFC from another server, it creates a session. If I put at the top of the Application.cfc<cfif findnocase(ListLast(CGI.SCRIPT_NAME, "/"), "Viewall") gt 0> <cfset this.sessiontimeout = CreateTimeSpan(0,0,0,5)> </cfif> Did I just set the sessiontimeout for EVERYONE or just for that "Viewall" call?REALLY, thank you for your time.
Guys,I'm using the CFML event gateway for asynchronous which works as discribed, however, within the listener cfc I cannot access my application's CFCs as they are not within the Coldfusion /cfusion/wwwroot folder but rather in a different directory. How can I reference an existing CFC within the context of the gateway CFC
For YEARS have used same CF11 development server and no problems. Suddenly I am getting a License error. License Error.You tried to access the Developer Edition from IP address (xx.xx.xx.xx). Already two IP addresses are accessing ColdFusion concurrently. The Developer Edition supports access by any IP address, but only two at a time, apart from the localhost. The additional IP addresses accessing ColdFusion are: 107.178.239.218,185.220.100.249 I have tried everything to reset CF. Restarted the service. Rebooted server. Cold booted. I have also added these to IP addresses to IIS forbidden IP's. I have not changed the server at all. No upgrades. My single scheduled task on same server has stopped working.
CF code formatting seems like a very basic feature for a code editor, but I can't seem to find/enable it in ColdFusion Builder. I would think such a basic and useful feature that was available in Dreamweaver CS3 would be included by Adobe. The HTML and CSS formatters work great, but I wish they would implement it for CF code. Am I not seeing it, or is it missing?
I have little experience with application.cfc files. I've used only rudimentary functions without really understanding, as long as I got the needed result.Today, I want to do something that I'm finding it hard to find answers for, and I know, for some, this is child's play. I'd just like you to share a word-based description of what I need to do. Once I understand it at a high level, and know which functions to incorporate, I can learn what I need to.As I hope the following diagram illustrates, when my user arrives at the root of my site, I want them to see the page contents. Anything they click will take them to another page in another folder. All requests will go to various files in the same folder. It's at this point, before a new page opens, that I want to test whether the user is logged in, or whether they need to create an account. All users must have an account.If the user is logged in, they need to proceed happily along to their requested page.What I don't want to do is push a
I have 4 seemingly identical servers running Windows Server 2019 and ColdFusion 2018 (on IIS10). I recently ran through the drill of applying the latest CF updates, starting with Update 4 and then Update 10 (which was cumulative). On three of the servers, this went fine - after Update 10, I had to run wsconfig and "Upgrade" my connector for IIS, and everything ran fine after that. But on one server, when I go to run wsconfig after Update 10, I get an error in the DOS-style window that starts with "java.io.IOException: Cannot run program "ExecuteAppCmd.exe": CreateProcess error=2, The system cannot find the file specified", and then a long java trace, and the wsconfig dialog does not list my connector (even though it's there and running). And if I try to "Add", I get a message saying "All the IIS sites are already configured by some other version of ColdFusion". The first time through, I ended up recreating my site in IIS and reinstalling CF2018 to restore m
Hello,I would like to retrieve the index of a record that has just been inserted.<CFQUERY name="Com_impr" datasource="#session.dbname#"> INSERT INTO Impr_commandes (SiteName, ICImp_ID, ICClient_ID, ICLivre_ID, ICProd_ID, CDate_crea, ICQuantite ) VALUES ('#SiteName#', #Impp#, #get_Clients.Client_ID#, #get_Livre.Livre_ID#, #get_Prod.Prod_ID#, '#DateFormat(now(),"dd/mm/yyyy")#', 1 ) SELECT Scope_Identity() AS [IC_ID]; </CFQUERY>This buggy!Is this the best method?Thank you in advance for your help.
Remix with Firefly Community Gallery
Thousands of free creations to fall in love with and remix in Firefly.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.