Copy link to clipboard
Copied
I tried to upgrade my CF2018 to CF2021. The installation process seemed to go well until I tried to reach my website. It showed my codes in the UDFs that I defined in the Application.cfm in the same directory.
I scrolled the Elements section to the top.
I scroll the webpage to the top, and on the Sources section, "<html><head></head><body>" were probably above what is showed below.
This is the section of my Application.cfm.
This is getnumbers.udf
So, I think my webpage is showing the content of UDF!
Any idea what went wrong? and how it may be fixed?
Thanks!
dchan
I think I know what's happening, and how to fix it.
Take a look at your CF Admin, and the first "settings" page, and look at the value for the setting "Allowed file extensions for CFInclude tag". Is it *? or CFM,CFML? If it's the latter, this means that ONLY those kinds of file extensions can be CFINCLUDEd. (If you don't have access to your CF admin, see the last paragraph I offer here.)
This was a change introduced in CF11 (not CF2021). And the setting is controlled not only by what you may
...The cause is the UDF extension, as Charlie has said. ColdFusion simply parsed the included UDF files as static text, instead of compiling them. See the documentation on cfinclude.
I am surprised that that happened. (Assuming, of course, that you had not been playing with the this.compileExtForInclude setting in Application.cfm). I thought ColdFusion would compile every included page the default. That is, the default setting in the ColdFusion Administrator is *.
I have 2 suggestions:
Copy link to clipboard
Copied
I think I know what's happening, and how to fix it.
Take a look at your CF Admin, and the first "settings" page, and look at the value for the setting "Allowed file extensions for CFInclude tag". Is it *? or CFM,CFML? If it's the latter, this means that ONLY those kinds of file extensions can be CFINCLUDEd. (If you don't have access to your CF admin, see the last paragraph I offer here.)
This was a change introduced in CF11 (not CF2021). And the setting is controlled not only by what you may pick on this page, but also by whether you/someone may have enabled the "secure profile" in the admin (or may have chosen during CF installation to implement CF's profile as "production+seecure"). That sets "more secure" default settings (the "secure profile" feature was added in CF10, so is also not "new"). You can even see this particular setting discussed on the CF admin Secure Profile page (in the Security section of the Admin), and how "cfm,cfml" is the "secure default value".
So it would seem you either didn't enable the "secure profile" in your CF2018 setup, or you or someone had changed this setting in your CF2018 admin and did not bring that changed setting into your CF2021 setup.
FWIW this setting is documented. See the section there, "allowed file extensions for <cfinclude>". Noe that it says there that "If any other file included using the <cfinclude> tag is not found in this list, their content will be statically included."
Finally, here's more good news: note how that doc also discusses how you can set this at the application level instead, which may be good for you to do in case you want to prevent this problem happening in a future move to a new CF version. The setting is called compileExtForInclude, and it can be set either as an attribute of cfapplcation or as a this.compileExtForInclude setting in an application.cfc. You could set it to "cfc,cfm,udf".
Let us know if this helps and how things go.
Copy link to clipboard
Copied
The cause is the UDF extension, as Charlie has said. ColdFusion simply parsed the included UDF files as static text, instead of compiling them. See the documentation on cfinclude.
I am surprised that that happened. (Assuming, of course, that you had not been playing with the this.compileExtForInclude setting in Application.cfm). I thought ColdFusion would compile every included page the default. That is, the default setting in the ColdFusion Administrator is *.
I have 2 suggestions:
Copy link to clipboard
Copied
Hi @Charlie Arehart and @BKBK ,
THANK YOU!
But, CF2021 still does not work. It gives me the following errors....
Any idea?
"Error","ajp-nio-127.0.0.1-8020-exec-7","01/24/22","17:29:23","INTERNET","Error Executing Database Query.[Macromedia][SQLServer JDBC Driver]An SSL socket connection could not be established because JRE 1.4 or above is required. The specific sequence of files included or processed is: F:\Forestry.gatrees\about-us\contact-us\county-units\CountyUnitsShow.cfm, line: 8 "
"Error","ajp-nio-127.0.0.1-8020-exec-6","01/24/22","17:30:24","INTRANET","Operation failed on the Migrate-CookieStorage data source.Reason of failure java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]An SSL socket connection could not be established because JRE 1.4 or above is required. The specific sequence of files included or processed is: F:\Forestry.Intranet\index_helloworld.cfm, line: 8 "
Is the above related to this setting? Should I point the Java Virtual Machine Path to C:\ColdFusion2021\jdk-11.0.12, which was the setting in CF2018?
Thanks in advance.
Dchan
Copy link to clipboard
Copied
If the change of the Admin solved your problem about the UDF include showing source code, great. That was the goal of my first answer. Note also that I offered there the option to change it in code, so that you don't run into this again in a future move to a new CF version. (And please mark one or both of the above as the "answer", for future readers. I don't see BKBK saying anything in his note that I did not say in mine. But if you may feel that his showing the screenshot was an important difference for you, ok.)
Moving on to your other problem, not it has nothing at all to do with the above setting. This is just a case where now that you've solved one problem, the code was able to run further and hit this other error.
And yes, this almost surely will be solved by changing your CF to use a newer JVM. You have not said what JVM your CF2021 is using. If this was a CF2021 installer you got from Sept 2021 or forward, it came with Java 11.0.11. If instead, your CF2021 installer was from before, back to the original release in Nov 2020, THAT one mistakenly came with a pretty old JVM, 11.0.1.
Then note that the latest JVM is 11.0.14, which came out last week (and includes bug fixes, security fixes, and more). Adobe offers the two most recent JVM versions (for 11 and 8) at https://www.adobe.com/support/coldfusion/downloads.html#additionalThirdPartyInstallers.
So to be clear, yes updating the JVM will almost certainly be the solution for you, whether to 11.0.12 or perhaps better to 11.0.14
Let us know how it goes.
Copy link to clipboard
Copied
I don't see BKBK saying anything in his note that I did not say in mine. But if you may feel that his showing the screenshot was an important difference for you, ok.
By @Charlie Arehart
I did not say what you had already said. I explicitly mentioned the root cause of the problem. You didn't.
I did so in the very first sentence: "The cause is the UDF extension". UDF occurs as the last word of your post, and only incidentally: 'You could set it to "cfc,cfm,udf"'. In any case, I took into account the sum total of what you had written and was gracious enough to attribute the explanation of the root cause to you.
Your suggestion leaned more towards setting this.compileExtForInclude in Application.cfm. I advocated the setting * in the ColdFusion Administrator. I also suggested that the poster migrate from Application.cfm to Application.cfc.
Copy link to clipboard
Copied
I disagree but will move on.
Copy link to clipboard
Copied
But, CF2021 still does not work. It gives me the following errors....
Dchan
By dchan@gfc.state.ga.us
Dchan, you will be glad to know that CF2021 is working, even though it is giving a new error.
"Error","ajp-nio-127.0.0.1-8020-exec-7","01/24/22","17:29:23","INTERNET","Error Executing Database Query.[Macromedia][SQLServer JDBC Driver]An SSL socket connection could not be established because JRE 1.4 or above is required. The specific sequence of files included or processed is: F:\Forestry.gatrees\about-us\contact-us\county-units\CountyUnitsShow.cfm, line: 8 ""Error","ajp-nio-127.0.0.1-8020-exec-6","01/24/22","17:30:24","INTRANET","Operation failed on the Migrate-CookieStorage data source.Reason of failure java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]An SSL socket connection could not be established because JRE 1.4 or above is required. The specific sequence of files included or processed is: F:\Forestry.Intranet\index_helloworld.cfm, line: 8 "
Is the above related to this setting? Should I point the Java Virtual Machine Path to C:\ColdFusion2021\jdk-11.0.12, which was the setting in CF2018?
No, I don't think the error is related to the Java setting. But I would strongly advise you to point CF2021's Java Virtual Machine path to C:\ColdFusion2021\jdk-11.0.12. Perhaps even better, install the latest Java [ JAVA SE 11.0.14 (LTS) ] and let CF2021 point to it.
"Error","ajp-nio-127.0.0.1-8020-exec-7","01/24/22","17:29:23","INTERNET","Error Executing Database Query.[Macromedia][SQLServer JDBC Driver]An SSL socket connection could not be established because JRE 1.4 or above is required. The specific sequence of files included or processed is: F:\Forestry.gatrees\about-us\contact-us\county-units\CountyUnitsShow.cfm, line: 8 "
The error says your site is using HTTPS, but ColdFusion is unable to create an SSL socket. This makes me think that you have to import the security keys into CF2021.
So, you could proceed as follows:
Copy link to clipboard
Copied
Here again you've repeated mostly what I've said. It's like you're blind to the fact you're doing this.
And FWIW I explicitly did not mention importing certs because that's often not needed, so should be a last resort. Instead, you say, "This makes me think that you have to import the security keys into CF2021."
Dchan, if you're interested to read more on the topic,. See my post:
Solving problems calling out of CF via https, by updating JVM
However you may or may not solve it, let us know how it goes.
Copy link to clipboard
Copied
Here again you've repeated mostly what I've said. It's like you're blind to the fact you're doing this.
By @Charlie Arehart
Again, our responses touch on common points. Inevitably, as we are answering the same questions. That does not mean I am repeating what you say.
In fact, you said "And yes, this almost surely will be solved by changing your CF to use a newer JVM". Whereas, I said quite the opposite, "No, I don't think the error is related to the Java setting".
And FWIW I explicitly did not mention importing certs because that's often not needed, so should be a last resort.
Those are your own words, admitting that I had suggested importing certificates as a solution and you had not mentioned it. Which clearly proves that I had not "repeated mostly" what you said.
In any case, we are in a community forum, engaged in a communal search for answers. The big picture is, we're not writing to each other, but to the forum. Voices in a bazaar.
Repetitions, fuzziness, failures and mistakes are allowed. As long as we strive to make up for them with the necessary simplification, clarification, rectification and correction. That fosters the emergence of new ideas.
Copy link to clipboard
Copied
Dude, it's like you just don't see or understand what I write:
All your "fuzzy" language at the bottom is obfuscation. It is NOT helpful if any of us offer responses in this forums that either REPEAT what someone has already said (especially JUST said) or that FAIL to take into account WHAT someone else JUST wrote (and perhaps propose an opposite point to something someone else said, without interacting with that).
Having posts that are written as if in a vacuum, taking no account of past messages in the thread (or at least RECENT ones) is not helpful, and not even in the spirit of writing "to the forum". Indeed, this is a forum and NOT a bazaar. They're quite different.
Copy link to clipboard
Copied
OK, Charlie. Shall we leave it there?
Copy link to clipboard
Copied
Hi @Charlie Arehart @BKBK ,
THANK YOU VERY MUCH for you all's inputs/suggestions/recommendations! You all have been VERY HELPFUL!
CF2021 is WORKING for me now!
I point the JVM Path to below where Java 11.0.12 is stored. Re-started the Cold Fusion 2021 Service. And my webpage showed up!
I downloaded the CF2021 within the last month. Somehow, the Java coming with the install was 11.0.1.
Dchan
Copy link to clipboard
Copied
Good news, dchan@gfc.state.ga.us . Thanks for the update.
All's well that ends well. 🙂
Copy link to clipboard
Copied
Great to hear that it's resovled.
As for your saying you downloaded CF in the last month, and yet was 11.0.1, let me propose 2 possibilities for that:
So was it either of those? or somewhere else perhaps? Let's do try to solve the bigger problem for others, especially if you found it elsewhere.
Finally, if you may trip over any other problems, you really should open a new forum thread rather than add to this one, even if it's abou issues related to your upgrade to CF2021. As it stands, you'd already marked "answers" for your FIRST question, and it would confuse readers if you picked now any LATER answers to this SECOND question. 🙂
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more