Hello,
In our existing setting, Coldfusion MX 7 is connected with MS SQL Server 2008. We will migrate our SQL server to MS SQL 2016. Is Coldfusion MX 7 compatible with MS SQL Server 2016? Thank you.
Jo
Hello,
In our existing setting, Coldfusion MX 7 is connected with MS SQL Server 2008. We will migrate our SQL server to MS SQL 2016. Is Coldfusion MX 7 compatible with MS SQL Server 2016? Thank you.
Jo
In the admin CFIDE server mode, I want to set up couple WSDL URLs that uses axis version 1. I changed the web server version to 1 but I still get the following messages on the log
Using Axis 2 for consuming the service http://local.domain.com/MembershipWebservice.asmx?WSDL
Downloaded the wsdl http://local.domain.com/MembershipWebservice.asmx?WSDL
Next is the error log
Cannot generate stub objects for web service invocation. Name: http://imisappprod/iMIS/AsiCommon/Services/Membership/MembershipWebservice.asmx. WSDL: http://imisappprod/iMIS/AsiCommon/Services/Membership/MembershipWebservice.asmx?WSDL. org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.databinding.UnmatchedTypeException: No type was mapped to the name propertyValue with namespace SetPropertyValue_input It is recommended that you use a web browser to retrieve and examine the requested WSDL document to ensure it is correct. If the requested WSDL document cannot be retrieved or is dynamically generated, it is likely that the target web service has programming errors.
Keep in mind that if I try to open the http://local.domain.com/MembershipWebservice.asmx?WSDL via the browser it works but it needs to consume using axis version 1.
thanks, Lou
I am at my wits' end attempting to integrate Google's recaptcha v2 with a simple HTML form. I hope someone can help.
In the <head> of the form page I have
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
as directed by Google.
Within the form I have
<div class="g-recaptcha" data-sitekey="xxxxxxxxxxx"></div>
where xxxxxxxxxxx is the sitekey provided by Google. When the form is displayed, this is properly creating the recaptcha widget.
On the target page that processes the form submission, I have this:
<cfset form.RecaptchaResponse = "">
<cfif StructKeyExists(form, "g-recaptcha-response")>
<cfset form.RecaptchaResponse = form["g-recaptcha-response"]>
</cfif>
<cfhttp url="https://www.google.com/recaptcha/api/siteverify" method="post" result="captchaResult">
<cfhttpparam type="formfield" name="secret" value="zzzzzzzz">
<cfhttpparam type="formfield" name="response" value="#form.RecaptchaResponse#">
<cfhttpparam type="formfield" name="remoteip" value="#cgi.remote_addr#">
</cfhttp>
<cfset result = "#deserializeJSON(StructFind(variables.captchaResult, 'FileContent'))#">
<cfif result.success is "false">
<cflocation addtoken="no" URL="/">
</cfif>
...start processing the submission.
where zzzzzzzz is the secret key provided by Google.
First I intentionally submit the form without responding to the captcha. I dump the variable captchaResult (a structure). Its 'FileContent' key is a JSON string, and in that string, 'Success' is 'false'. This submission redirects to the site's home page -- exactly as desired.
Next I submit the form correctly, including responding to the captcha. Dumping captchaResult and then aborting, I see that 'Success' is 'true'. In other words, Google is definitely passing this submission.
So now I reload everything and resubmit correctly, including responding to the captcha. ColdFusion replies with this on my target page:
We're sorry...
Element G is undefined in FORM.
The error occurred on line 1.
What the #$% is going on?? Any suggestions will be gratefully and humbly accepted.
Message was edited by: Jordan Backler Forgot to include that I am using CF 10
Greetings,
I have a fresh install of CF11 standard on Windows 8 server 64x
16GB of ram
JVM settings:
-server -Xmn1024m -Xss1024k -XX:PermSize=256m -XX:MaxPermSize=2048m -XX:+UseParallelGC -Xbatch -Dcoldfusion.home={application.home} -Duser.language=en -Dcoldfusion.rootDir={application.home} -Dcoldfusion.libPath={application.home}/lib -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true -Dcoldfusion.jsafe.defaultalgo=FIPS186Random
Min Heap: 2048mb, Max Heap 6144mb
VFS settings:
Global memory limit for VFS: 1000mb
Memory Limit per Application for VFS: 400mb
Currently CF is using 1.7GB of ram
I have a 6 applications on this server. 1 of which makes use of the VFS.
The others are simple cfm applications that have NOTHING to do with the VFS system.
I have a scheduled task that calls simple cfm pages to update tables in our database. When these tasks run, i get a global error email (ones i have setup if a cf error happens) and the gist of the error is
Browser | CFSCHEDULE |
DateTime | {ts '2014-08-16 15:07:00'} |
Diagnostics | The Global Memory Limit 1000 MB for In-Memory Virtual FileSystem exceeded . <br>Increase the VFS memory limit in ColdFusion Administrator. <br>The error occurred on line 17. |
GeneratedContent | [empty string] |
HTTPReferer | [empty string] |
Mailto | [empty string] |
Message | The Global Memory Limit 1000 MB for In-Memory Virtual FileSystem exceeded . |
QueryString | [empty string] |
RemoteAddress | xxx.xxx.xxx.xxx |
I have a utility i can run to view all the files in the VFS. and there is currently a total of 8 cfm files there that make up 4064KB of space within the VFS.
The 1 application that actually uses the VFS has several functions. One of which basically writes out CFM files and then includes the cfm as a content variable and returns the variable.
Under CF9 we were also deleting the ram drive CFM files after including them. But under CF11 this fails with an error saying the modified date could not be found. I have since removed the delete file part and the system works but we get this out of memory error with the VFS.
Can someone shed some light on this for me?
It makes no since.
Thanks
TSIA.
I recently submitted cfrepo.com to Blue Coat for analysis/categorization so that I could access it from our network (sites with category:none are blocked).
Initially, it was categorized as File Storage/Sharing (again, blocked by our network.) I replied to the email asking to have the category changed so that I could access cfrepo.com from here. They replied "This domain appears to have expired and it is no longer registered". What????
V/r,
^ _ ^
<cfset DateSelect=16/07/2017>
<cfset NumJour=#Dayofweek(DateSelect -1)#>
<cfset Dim=#dateadd('D',-NumJour,DateSelect)#>
<CFQUERY name="MajAgenda2" datasource="#session.dbname#">
SELECT AgendaObjet FROM Agenda WHERE AgendaDateDeb=#DateSelect# GROUP BY AgendaObjet
</CFQUERY>
<CFOUTPUT>MajAgenda2.recordcount :# MajAgenda2.recordcount# </CFOUTPUT>
<CFOUTPUT query="MajAgenda2">
<cfset AgendaObjet="#AgendaObjet#">
</CFOUTPUT>
Hello,
I try to select an item for a date with no result
Thank you for your help
cordially
Hello all,
I have an application running on CF9 and there are many Custom Tags and CFC files - that some are calling directly. For example, somehow a bot found one and now it tries to index it as a direct URL.
http://www.yourdomain.com/my-custom-tag.cfm
How do I stop any direct URL access to a CT or CFC - and only allow the CT to run when called?
Hi -- We are thinking of upgrading from CF10 to CF 2016 and ALSO upgrading from RHEL 6 to RHEL 7 while we're at it.
According to the matrix, RHEL 7 appears to be supported.
Can anyone tell me if CF2016 uses the new RHEL 7 systemctl stuff to start/stop the CF process? Or is it still done through /bin/coldfusion start?
Just wondering if anything special has changed for RHEL 7, or if it's still the same way as on RHEL 6.
One other question: does anyone here use CF 2016 on Linux on a large site? Nice and stable and good? Recommend upgrading from CF10?
Thanks!
Greetings,
I cannot find a coherent answer to this question on The Google or The Adobe. I understand that CF 2016 STANDARD has a CFTHREAD limitation. I'm assuming that is just a CFTHREAD FUNCTION limitation and not an overall thread limitation with the web server itself? In other words, if I'm just serving CFM web pages, I'm not limited to concurrent connections (concurrent web serving threads)? Serving CFM web pages (without using the CFTHREAD tag or function on any of those pages) should be as performant as CF ENTERPRISE?
Is this correct?
Trying to migrate our Microsoft Access DB's to a new server running Microsoft Server 2012 and ColdFusion 16. I have been able to do this in the past using the 32 bit ODBC Data Source Administrator, but it doesn't seem to be working this time.
I have an Adobe Flex app that I've written, and of course I occasionally need to call remote procedures on the server sometimes. We use ColdFusion 11 on the server-side to handle these remote calls.
When I install Update #12 on ColdFusion 11, I get the following error when I make a remote call:
faultCode:Client.Message.Encoding faultString:'Creation validation for class 'flex.messaging.io.ObjectProxy' failed.' faultDetail:'null'
It only seems to happen when I send a complex data-type (like an Array of Objects) to the remote function. It doesn't happen when I'm just sending strings.
Also, I'm using a secure channel when I make the remote call -- don't know if that might be the difference or not.
Please let me know if I can provide any further information to help track down the root of this issue. I'm happy to provide any logs you might need, or whatever. Just let me know.
Thanks,
Laurence MacNeill
Ball Ground, Georgia, USA
I understand how to upload JPG files and Audio files using CFFILE. But no success uploading a video MP4 file. The Coldfusion server is rejecting that mime. In Coldfusion 10, am I to use CF Admin to add an acceptable mime type for upload to the server? Or is there an external file list of mime types CF server points to. How exactly is a new mime type added? I want to upload .MP4 videos using CFFILE. Right now ACCEPT="video/mp4" does not work. Thanks.
Hello,
I have a Coldfusion 2016 instance on Windows 2012R2, started from the AWS Marketplace, and an RDS MySQL instance. Both instances are on the same VPC and subnet. I am unable to connect ColdFusion 2016 to the RDS MySQL instance. I have created an ODBC in ColdFusion 2016. When ColdFusion tries to connect to the RDS MySQL I get an error. I have tried with the two drivers for MySQL included in Coldfusion 2016.
With the ColdFusion driver MySQL (DataDirect) I get the following error:
Connection verification failed for data source: MSQL_Desa
java.sql.SQLException: [Macromedia][MySQL JDBC Driver]Connections to MySQL Community Server are not supported. Please contact MySQL to obtain a MySQL Enterprise or Commercial version.
The root cause was that: java.sql.SQLException: [Macromedia][MySQL JDBC Driver]Connections to MySQL Community Server are not supported. Please contact MySQL to obtain a MySQL Enterprise or Commercial version.
With the ColdFusion driver MySQL 5 I get the following error:
Connection verification failed for data source: MySQL5
java.sql.SQLException: No suitable driver available for MySQL5, please check the driver setting in resources file, error: com.mysql.jdbc.Driver
The root cause was that: java.sql.SQLException: No suitable driver available for MySQL5, please check the driver setting in resources file, error: com.mysql.jdbc.Driver
Is it possible to connect ColdFusion 2016 to RDS MySQL ? Which driver should I use ?
The security team here at the University seems to think ColdFusion is dead. Is it? I'm getting tired of trying to defend it. Do you have any resources to help? List of Companies perhaps?
Just so we're all on the same page, Adobe chat support's official response to this question was;
"... we don't have option for that, however if you are facing any technical issue you can contact our expert in technical team."
And calling tech support I was presented with the response;
"We can't help you. Go to the forums."
When I asked tech support to route me to a supervisor he said, "Adobe doesn't care if you discontinue use of their product" Yep. He actually said that to me
Hi, I'm wondering if anyone has ever figured out a way to install ColdFusion 9 in Windows 10 (IIS 10)? I understand CF 9 is not officially supported in Windows 10 / IIS 10, but I'm wondering if there is some clever way to make this work? Our ColdFusion production server is hosted by our ISP and we are unable to upgrade ColdFusion at this time, so I'm stuck with CF 9 for now. I would very much like to be able to continue to develop and test in the same version as our production server, and my new development machine is Windows 10.
I tried the CF 9 installer, chose the developer option, and got no errors until I got to the step where the installer wants to load the ColdFusion administrator page to complete the setup process where I promptly get a 404.3 not found error. I tried rebooting the machine, went to the CF admin and same results. After some further looking into this, I believe the issue was that the IIS handlers never got installed, so IIS did not know what to do with a CFM file. So even though the Admin files exist on the server, IIS doesn't know how to serve them to the browser. Also it appears the following Windows services never got installed:
ColdFusion 9 .NET Service
ColdFusion 9 ODBC Agent
ColdFusion 9 ODBC Server
So I guess I really have two problems: 1. How to get all the Windows services to install, and 2. How to make ColdFusion work with IIS 10.
When I try to use the Web Server Configuration Tool to set up IIS, it looks like it could work until I try to add all IIS websites and click OK at which point I get the error "Version 10.0 is installed. Supported versions are 4.x, 5.x, 6.x, 7.x". So might there be a way to fool the WSC Tool into thinking that IIS 10 is in fact IIS 7 or is that not going to help? I did take the step of adding the IIS 6-related management tools thinking that would allow the CF 9 installer to work with IIS 10 (this seemed to be necessary for IIS 7.x).
If I could get the Windows services to install, but then use another server like Apache, might that possibly work? Any other platform combinations in Windows 10 like that that could possibly work? Thanks in advance for any ideas you might have.
Is the product something to create a job web platform?
I just finished reading a book on introducing Object Oriented Programming (OOP) in ColdFusion. I found the book to be very enlightening on many levels however I was left with some questions and there didn't seem to be anywhere to go after the book to learn more advanced topics or to seek clarification or more information.
I may be creating a few questions on this forum over the next few days/weeks with OOP related subjects and ColdFusion that I would love your feedback and opinions on - especially from people that have experience working with OOP.
This question pertains to Data Access Objects (DAO) and best practices or recommendations for using them in a ColdFusion application. I'll be using a generic "User DAO" as an example.
Historically whenever I've created a DAO method that updates a database table within a CFC I've always included a <cfargument> for every single column that can be updated in the database. Then within my method I check for the existence of an argument and if passed, I update that column. The end result is an update method which only updates database columns that were passed as arguments. This has always made sense to me for example if the user wants to update their password you can simply update that one field.
Here's an example method to show what I mean:
<cffunction name="updateUser"> <cfargument name="usersID" type="numeric" required="yes" /> <cfargument name="firstName" type="string" required="no" /> <cfargument name="lastName" type="string" required="no" /> <cfargument name="emailAddress" type="string" required="no" /> <cfargument name="passwordHash" type="string" required="no" /> <!--- update the database ---> <cfquery datasource="#application.dsn#"> UPDATE Users SET DateModified = #createODBCDateTime(now())# <!--- go through each column, check to see if an argument was passed and if so, update the column ---> <cfif structKeyExists(arguments, "firstName")> , firstName = <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.firstName#" /> </cfif> <cfif structKeyExists(arguments, "lastName")> , lastName = <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.lastName#" /> </cfif> <cfif structKeyExists(arguments, "emailAddress")> , emailAddress= <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.emailAddress#" /> </cfif> <cfif structKeyExists(arguments, "passwordHash")> , passwordHash = <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.passwordHash#" /> </cfif> WHERE UsersID = <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.usersID#" /> </cfquery> <cfreturn true /></cffunction>
In the book, the author shows a similar method however instead of passing individual arguments, he suggests passing a single bean object to the method and then updating the data. Here's an example:
<!--- UPDATE ---><cffunction name="updateUser"> <cfargument name="userBean" type="any" required="yes" /> <!--- update the database ---> <cfquery datasource="#application.dsn#"> UPDATE Users SET DateModified = #createODBCDateTime(now())# , firstName = <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.userBean.getFirstName()#" /> , lastName = <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.userBean.getLastName()#" /> , emailAddress= <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.userBean.getemailAddress()#" /> , passwordHash = <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.userBean.getPasswordHash()#" /> WHERE UsersID = <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.userBean.getUsersID()#" /> </cfquery> <cfreturn true /></cffunction>
While this makes sense because you can pass a single object as an argument instead of a bunch of arguments it doesn't make sense to me to update database columns for data that hasn't necessarily changed or that the calling service object wasn't designed to update (again like updating a password).
I've also seen discussion online for other languages where people seem to discourage writing methods with a lot of arguments but I haven't been able to figure out why. My only guess is because many other languages don't allow for passing named argument collections (like CFML does) so you'd have to be very careful about the order you submit your arguments.
I'd love your opinion on whether creating a DAO object method that accepts a single bean object is better than a method requiring only the arguments that actually need updating.
I just finished reading a book on introducing Object Oriented Programming (OOP) in ColdFusion. I found the book to be very enlightening on many levels however I was left with some questions and there didn't seem to be anywhere to go after the book to learn more advanced topics or to seek clarification or more information.
I may be creating a few questions on this forum over the next few days/weeks with OOP related subjects and ColdFusion that I would love your feedback and opinions on - especially from people that have experience working with OOP.
This question pertains to bean objects and storing subsets of data within them. I understand the basic concept of storing information within a bean to represent a single record of information. For example, you might have a "User" object bean which stores information like firstName, lastName, emailAddress, etc...
However I find that often times you may want to store a subset of data within your object. For example, you might let users store one or more mailing addresses to their record. I like to think of these subsets as "attachments" to the primary record. They come from a different table in the database but they are very much a significant part of the root data.
In the past when I'm using procedural programming I store my user data in a structure object and then include a separate key for each subset of data which might contain a nested query like this:
As you can see in the above screenshot I have an object containing the information on the user as well as a subset of data (attachments) for each address associated with the user.
Now I suppose this type of thing could be accomplished from within the bean object. Technically you can store anything you like in there... but does storing a sub-query of data violate the entire concept of a bean? Or is there a graceful way to accomplish this that I haven't encountered yet?
One way I could accomplish this is by using a Service Layer to grab the user data from the DAO and then grab all of the addresses from a Gateway object and shove all of them into the bean like this:
I'm still new to using UML so please forgive me if I've used the wrong symbols.
In the above example the client would request getUserByID() from the UserService object which would return a bean object containing the data from the userDAO object and the AddressGateway object. Is this the correct way to go about this type of data retrieval?
The only problem I can see with this type of bean comes when you want to update the user record using some type of DAO updateUser() method. In this case, the bean contains an "addresses" query object which isn't part of the "users" table. I suppose having extra data in the bean won't hurt an SQL update statement but it does involve passing extra data to a CRUD method that doesn't need to be there.
I just finished reading a book on introducing Object Oriented Programming (OOP) in ColdFusion. I found the book to be very enlightening on many levels however I was left with some questions and there didn't seem to be anywhere to go after the book to learn more advanced topics or to seek clarification or more information.
I may be creating a few questions on this forum over the next few days/weeks with OOP related subjects and ColdFusion that I would love your feedback and opinions on - especially from people that have experience working with OOP.
My questions pertain to the use of bean objects when working with a single record of data. For sake of these questions lets work with a simple "User" object that contains information about a person like firstName, lastName, emailAddress, and a passwordHash.
Question 1: What is the purpose of using the <cfproperty> tag? Is it only for introspection purposes when you run <cfdump> on the component instance or does it actually have an impact on the component and the data within it? In fact, the only time you can see the properties when you dump the component is if it has a matching getter method.
Question 2: Why is it so important to create public getters/setters within a bean object when it would be easier to just access the properties of the bean directly?
In order to clarify what I mean, I created two components below, user.cfc and user2.cfc. User.cfc is a bean object that has getters/setters for each <cfproperty> (note: I left some getters/setters out to keep this example brief and please excuse the indentation as I can't seem to get the forum editor to display my code very well):
<cfcomponent displayname="user" hint="I am the user class"> <cfproperty name="firstName" type="string" default="" /> <cfproperty name="lastName" type="string" default="" /> <cfproperty name="emailAddress" type="string" default="" /> <cfproperty name="passwordHash" type="string" default="" /> <cfset variables.instance = structNew() /> <!--- Constructor ---> <cffunction name="init" access="public" hint="I am the constructor method" > <cfargument name="firstName" required="false" type="string" hint="I'm the first name of the user" /> <cfargument name="lastName" required="false" type="string" hint="I'm the last name of the user" /> <cfargument name="emailAddress" required="false" type="string" hint="I'm the email of the user" /> <cfargument name="passwordHash" required="false" type="string" hint="I'm the hashed password for the user" /> <cfscript> variables.instance.firstName = arguments.firstName; variables.instance.lastName = arguments.lastName; variables.instance.emailAddress = arguments.emailAddress; variables.instance.passwordHash = arguments.passwordHash; </cfscript> <cfreturn this /> </cffunction> <!--- SETTER: FirstName ---> <cffunction name="setFirstName"> <cfargument name="firstName" required="true" type="string"> <cfset variables.instance.firstName = arguments.firstName /> </cffunction> <!--- GETTER: FirstName ---> <cffunction name="getFirstName"> <cfreturn variables.instance.firstName /> </cffunction> <!--- Memento returns the instance data ---> <cffunction name="getMemento"> <cfreturn variables.instance /> </cffunction></cfcomponent>
The following code instantiates the component, dumps it, and then updates the firstName of the user object. Finally it dumps the data in the object.
<!--- instantiate our component ---><cfset user = createObject("component", "cfc.user") .init( firstName = "John", lastName = "Smith", emailAddress = "test@test.com", passwordHash = "xxxx" ) /><!--- Dump the component for introspection ---><cfdump var="#user#" /><!--- dump our instance ---><cfdump var="#user.getMemento()#" label="default instance" /><!--- change the firstName ---><cfset user.setFirstName("Jane") /><!--- dump our instance again ---><cfdump var="#user.getMemento()#" label="updated instance" /><!--- dump the first name ---><cfdump var="#user.getFirstName()#" />
This gives us the following output:
In the second example, users2.cfc, I'm creating a much simpler CFC where the properties are stored in the this scope to allow direct access to the variables without the need for getter/setter methods.
<cfcomponent displayname="user" hint="I am the user class"> <cfproperty name="firstName" type="string" default="" /> <cfproperty name="lastName" type="string" default="" /> <cfproperty name="emailAddress" type="string" default="" /> <cfproperty name="passwordHash" type="string" default="" /> <cfset this.instance = structNew() /> <!--- Constructor ---> <cffunction name="init" access="public" hint="I am the constructor method" > <cfargument name="firstName" required="false" type="string" hint="I'm the first name of the user" /> <cfargument name="lastName" required="false" type="string" hint="I'm the last name of the user" /> <cfargument name="emailAddress" required="false" type="string" hint="I'm the email of the user" /> <cfargument name="passwordHash" required="false" type="string" hint="I'm the hashed password for the user" /> <cfscript> this.instance.firstName = arguments.firstName; this.instance.lastName = arguments.lastName; this.instance.emailAddress = arguments.emailAddress; this.instance.passwordHash = arguments.passwordHash; </cfscript> <cfreturn this /> </cffunction> <!--- Memento returns the instance data <cffunction name="getMemento"> <cfreturn variables.instance /> </cffunction>---></cfcomponent>
I then instantiate the component just like the first example however I can then update the properties of the user object by directly getting and setting them without any special methods:
<!--- instantiate our component ---><cfset user2 = createObject("component", "cfc.user2") .init( firstName = "John", lastName = "Smith", emailAddress = "test@test.com", passwordHash = "xxxx" ) /><!--- dump the component for introspection ---><cfdump var="#user2#" /><!--- dump our instance ---><cfdump var="#user2.instance#" label="default instance" /><!--- change the firstName ---><cfset user2.instance.firstName = "Jane" /><!--- dump our instance again ---><cfdump var="#user2.instance#" label="updated instance" /><!--- dump the first name ---><cfdump var="#user2.instance.firstName#" />
This produces the following output:
So why do we need to go to all the extra effort of creating getter/setter methods in bean objects when we can access the properties directly as if it were a normal structure? Other than for introspection reasons I can't figure out why beans need to be built this way?