Quantcast
Channel: Adobe Community : All Content - ColdFusion
Viewing all 5979 articles
Browse latest View live

Coldfusion 11 Keeps Hanging

$
0
0

Hi All,

 

For the past few weeks, the ColdFusion Server will randomly just hang... where a page request will just keep spinning... restarting the server has cleared it up... but we're having to do that more frequently.

 

Can you give me some insights into this problem or how to debug it on CF11 Server?

 

Version: ColdFusion 11 Update 7

IIS: Windows Server 2012R2 8.5.9600.16384

Database: SQL SERVER 2008 R2

 

I suspect the problem may be related to the number of workers/processes running at a given time? How do I increase this from the default installation?

 

Thanks,

 

John


Element ARRAYROLES is undefined in a CFML structure referenced as part of an expression.

$
0
0

Here's my code:

 

<cfif StructKeyExists(cfData.data[i], "inherited_roles") || IsArray(cfData.data[i].reader_roles)>  <cfset arrayRoles = "reader_roles" >  <cfif ArrayIsEmpty(cfData.data[i].inherited_roles)>  <cfset arrayRoles = "inherited_roles" >  </cfif>  <cfloop index="p" from="1" to="#arrayLen(cfData.data[i].arrayRoles)#">     <!---some code here--->  </cfloop></cfif>

 

And here's the error I kept getting.

Element ARRAYROLES is undefined in a CFML structure referenced as part of an expression.

 

The error occurred on line 07 when I have the #arrayLen(cfData.data[i].arrayRoles)#.

 

Any suggestion is much appreciated

405 - HTTP verb error

$
0
0

Hi everyone. I am testing some simple code on this page: Untitled Document  to do an online order with Stripe.com, but I keep getting this error message when I click Submit:

 

405 - HTTP verb used to access this page is not allowed.

The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.

 

Does anyone know what to do to get this to work? Do I need to update something in the CF11 administrator pages or do I need to update something in our IIS server?

 

Andy

ColdFusion - spreadsheetaddrows errors out

$
0
0

When trying to use the includecolumnnames parameter CF throw and error saying the  spreadsheetaddrows function only supports 2 to 6 parameters, but documentation shows 7. Even the example in the spreadsheetaddrows documentation fails:

 

<cfscript>

    out_fl = "#expandpath("./")#header.xlsx";

        xlobj = SpreadsheetNew("2d_arr_data", true);

        qry_data = queryNew("product, customer, qtr");

        queryAddRow(qry_data, {product:"aniseed syrup", customer="annie", qtr="1"});

        queryAddRow(qry_data, {product:"camembert pierrot", customer="pierre", qtr="2"});

        queryAddRow(qry_data, {product:"scones", customer="connie", qtr="4"});

    datatype = [""];

        spreadsheetAddRows(xlobj, qry_data,1,1,"true",datatype,true);

        cfspreadsheet(action="write", filename="#out_fl#", name="xlobj", overwrite=true);

        cfspreadsheet(action="read", src="#out_fl#", query="qryxl");

        writeDump(qryxl);

</cfscript>

Keep a value across different application names

$
0
0

Hello, all,

 

I'm trying to find a way to keep something persistent across different application names without using the server scope (which could be lost upon reboot.)

 

Here's the situation.  I've got a very large site.  Many sections utilize the root application.cfc, but others have their own application.cfc with a unique name.

 

/dtr/application.cfc   <!--- app name = "dtr" --->
/dtr/index.cfm

/erc/index.cfm   <!--- uses root app.cfc --->

/mov/application.cfc   <!--- app name = "mov" --->
/mov/index.cfm

/suv/index.cfm   <!--- uses root app.cfc --->

/zyx/application.cfc   <!--- app name = "zyx" --->
/zyx/index.cfm

/root/application.cfc   <!--- app name = "ust" --->
/root/index.cfm

 

No matter which page is loaded, first, (could be bookmarked, or link sent in a message) I need to check to see if the user has seen a banner alert.  If not, display the alert and set a value for all future references.

 

I thought of session cookies, but when you get to a section with it's own app.cfc and the name changes, boom.. the previous set session value doesn't exist in this new session.

 

I thought of standard cookies, but I need the cookie to clear if/when the user closes the browser, so the banner will be viewed the next time the user visits.

 

I (obviously) don't want this alert loading on every page, every time.  That would be super-annoying. 

 

Any thoughts or suggestions on how to make this work?

 

V/r,

 

^_^

coldfusion 2016 clustering

$
0
0

I have 2 servers in stage setup. Installed Coldfusion in both. My question is

 

1) I would like to manage both servers using a single admin page URL installed in first server only

2)  If I create a cluster by adding the second server as remote instance, then do I need CFIDE folder in second server?

 

I am new to coldfusion setup and your suggestions will help me a lot.

 

 

Thanks,

 

Sarath M

CFGrid bound to another CFGrid returns null

$
0
0

I have a cfgrid bound to another cfgrid that always returns null for the value.

  • Worked in CF8
  • Binding to a cfinput displays proper value
  • CFC is no problem hard coded value in place of bind works
  • writing to log from cfc verifies null value returned

 

<!--- select office --->

  <input type="checkbox" id="pckOffice1" onclick="setOffice();" checked>Bangor

  <input type="checkbox" id="pckOffice3" onclick="setOffice();" checked>Lamoine

  <input type="checkbox" id="pckOffice5" onclick="setOffice();" checked>Lincoln

  <input type="checkbox" id="pckOffice7" onclick="setOffice();" checked>Machias

  <br/>

  <input type="hidden" id="OfficeFilter" name="OfficeFilter" value="'1','3','5','7','2','9'">

 

<!--- cycle grid --->

  <cfgrid name="gdCycle" format="html" colheaderbold="true" striperows="no"

         striperowcolor="##ccffcc" selectcolor="#selectcolor#" selectmode="row" selectonload="false"

         bgcolor="##ffffbf;" pagesize="13" height="370"

         bind="cfc:MVRS_Cycle.getCycles({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridso rtdirection},{OfficeFilter@change})">

  <cfgridcolumn name="Print" header="" width="55">

  <cfgridcolumn name="CycleID" header="Cycle" width="60">

  <cfgridcolumn name="NumRoutes" header="## Routes" width="70">

  </cfgrid>

 

 

<!--- selected cycle bound to cycle grid --->

  <cfinput name="" id="selectedcycle" bind="{gdCycle.CycleID}">

 

 

<!--- route grid bound to cycle grid --->

  <cfgrid name="gdRoute" colheaderbold="true" format="html" striperows="no"

         bindonload="false" height="370" selectmode="row" style="display:none;"

         pagesize="12" selectonload="false"

         bind="cfc:MVRS_Route.getRoutesByCycleID({cfgridpage},{cfgridpagesize}, {cfgridsortcolumn},{cfgridsortdirection},{gdCycle.CycleID},{OfficeFilter@change})">

  <cfgridcolumn name="RouteID" display="false">

  <cfgridcolumn name="Print" header="" width="60">

  <cfgridcolumn name="RouteNumber" width="70">

  <cfgridcolumn name="NumberCustomers" width="90">

  <cfgridcolumn name="NumberMeters" width="70">

  <cfgridcolumn name="NumberReadings" width="80">

  <cfgridcolumn name="Office" header="Office" width="50">

  <cfgridcolumn name="Complete" header="Complete?" width="80" dataalign="center"

               type="string_noCase">

  <cfgridcolumn name="ForceComplete" header="Force Complete?" dataalign="center" width="130">

  </cfgrid>

 

Any ideas? I'm stumped....

When will Adobe provide a hotfix for TomCat 7.0.54

$
0
0

I can upgrade Tomcat myself, but that approach isn't documented and isn't likely to be supported by Adobe.


Tomcat is bundled as part of ColdFusion 11, so I would hope Adobe would either provide a hotfix or suggest a supported method to upgrade Tomcat.


Tomcat 7.0.59 fixes the following issues:

  • Security Manager bypass CVE-2014-7810
  • Request Smuggling issue CVE-2014-0227
  • Denial of Service issue CVE-2014-0230

Does Adobe have a timeline for providing a hotfix for TomCat 7.0.68

$
0
0

I can upgrade Tomcat myself, but that approach isn't documented and isn't likely to be supported by Adobe.

 

Tomcat is bundled as part of ColdFusion 11, previously Adobe has provided a hotfix to upgrade Tomcat.  Is this something on your roadmap?

 

Tomcat 7.0.68 fixes the following issues:

 

    Moderate: CSRF token leak CVE-2015-5351

    Moderate: Security Manager bypass CVE-2016-0714

    Moderate: Security Manager bypass CVE-2016-0763

x-forwarded-for in CF 11

$
0
0

Trying to get the actual ip address of a user with coldfusion sitting behind an F5 appliance.  Researching I found the RemoteIpValve which can be placed in server.xml, but it does not seem to work on CF 11.  Does anyone know of any tricks to getting this to work or does it not work at all in CF 11?

 

Thanks

How do you disable the tooltips in a cfchart (cf11)?

$
0
0

If I use a chart like this:

 

<cfchart tipStyle="none">

    <cfchartseries type="line">

        <cfchartdata item="1" value="1">

        <cfchartdata item="2" value="2">

        <cfchartdata item="3" value="3">

        <cfchartdata item="4" value="4">

    </cfchartseries>

    <cfchartseries type="bar">

        <cfchartdata item="1" value="10">

        <cfchartdata item="2" value="11">

        <cfchartdata item="3" value="12">

        <cfchartdata item="4" value="13">

        <cfchartdata item="5" value="14">

        <cfchartdata item="6" value="15">

        <cfchartdata item="7" value="16">

        <cfchartdata item="8" value="17">

    </cfchartseries>

</cfchart>

 

When my mouse rolls over the data points it displays a tooltip.  I want to make it so that the tooltip does not appear. 

cfqueryparam tool

$
0
0

I am looking for a tool that will go through my coldfusion code and add cfqueryparam's where needed. I found many that will scan and show me where I need to make changes but I found one at http://www.webapper.com/blog/index.php/2008/7/22/ColdFusion-SQL-Injection which is pretty close to what I was looking for. But it doesn't add the cfsqltype (or maxlength) and I was wondering if this still prevents sql injection without cfsqltype? And if it is required (I know it is technically optional) do you know of another tool that will do this? I also read that it is also important to make sure that any variables in the order by clause are parameterized also, which this tool doesn't check for.

 

I am thinking of buckling down and changing the code from http://www.webapper.com/blog/index.php/2008/7/22/ColdFusion-SQL-Injection to do all this, but I thought it would be wise to ask first.

Dreamweaver CC Coldfusion 10 extension?

$
0
0

Hi

 

I'm on the road trying to configure Dreamweaver CC for a CF10 project on my laptop.

 

Back in my office on my server i have DWCC configured using the CF10 extensions and I remember that I used an extensions file with the '.zxp' suffix; for the life of me I can't find that file on the web anywhere. (The .mxp extension simply won't run in the CC extension manager).

 

Anyone know where it is?

 

Thanks in advance, and happy holidays.

 

Rich

Setting application variables in onRequestStart???

$
0
0

Hello, all,

 

I'm working on some legacy code that I inherited from a long-gone developer (he left about two years ago.)

 

For some reason, the developer is setting application variables in the onRequestStart() section of application.cfc.

 

I was under the impression that application variables were set when the server is first started, or comes back from a reboot, or similar situation.  Yet until recently, this application was running without a hitch.

 

Am I crazy?  Obviously the variables are working, but I didn't think it would.

 

V/r,

 

^_^

How to run a job that will check if files exist?

$
0
0

I have a folder 'realtime' that has about 15 txt files(test1.txt,other.txt etc), theres is other jobs nothing related to coldfusion that if something goes down then the file wont exist anymore.

So I want to create a job that if a txt file doesnt exist then it will sent me a email.

what would be the best way to do something like this?

would i have to check for each individual txt file , something like ??

 

 

<cfset Pathtest = "\\folder1\dept\Alerts\other.txt"><cfif !fileExists(Pathtest)>  <cfmail ...>  sent me a email  </cfmail>   </cfif>

CF2016 - Alias for /cf_scripts/scripts in the Built-In Web Server

$
0
0

I'm following the lockdown guide here:

http://wwwimages.adobe.com/content/dam/acom/en/products/coldfusion/pdfs/coldfusion-2016-lo ckdown-guide.pdf

 

The guide suggests moving the /cf_scripts/scripts directory, so I did.

The guide also suggests using only the built-in web server for accessing ColdFusion Administrator, so that's how I have it set up.

The guide also states that you should create an alias for the moved directory in the built-in web server.  See page 58 of the PDF.

If you plan on using the built-in web server to access ColdFusion administrator you may need to create an alias for /cf_scripts/scripts if you changed the Default Script Src setting in ColdFusion administrator.

To Create a new Alias for /cf_scripts/scripts in the built-in web server

If you plan to use the built-in web server for accessing ColdFusion administrator then you must also add an alias by adding a Context tag inside the Host tag of server.xml located: /opt/cf11/cfusion/runtime/conf/server.xml

<Context path="/"

docBase="/opt/cf11/cfusion/wwwroot"

Workie="/opt/cf11/fusion/runtime/cone/Catalina/localhost/tamp"

aliases="/coscripts=/opt/cf11/fusion/wwwroot/CFIDE/scripts" />

Restart ColdFusion, then test by visiting /cfscripts/cfform.js on your builtin server.

 

There are a ton of typos in this (Workie vs WorDir, cone vs conf, tamp vs tmp, coscripts vs cfscripts, etc.

This also appears to be referencing the cf11 paths (CFIDE/scripts vs cf_scripts/scripts, and /cfscripts/cfform.js vs cf_scripts/scripts/cfform.js).

 

Further, coldfusion-error.log notes the following:

WARNING: A context path must either be an empty string or start with a '/' and do not end with a '/'. The path [/] does not meet these criteria and has been changed to []

WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'aliases' to '/cf_scripts/scripts=/cf_scripts/test_scripts' did not find a matching property.

 

The first line isn't an issue, but the second line is.  aliases isn't a valid property of context.

The server.xml file has an example, and it's as follows:

<Context path="" docBase="<cf_home>/wwwroot" WorkDir="<cf_home>/runtime/conf/Catalina/localhost/tmp" >

<Resources>

    <PreResources base="docBase1" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/aliasPath1"/>

    <PreResources base="docBase2" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/aliasPath2"/>

  </Resources>

</Context>

 

This aligns with the Apache docs.

 

I have CF installed on Windows, at F:\CF_2016\ .  This is what I've done to alias the scripts directory (renamed to test_scripts for testing) for the built-in web server:

<Context path="/" docBase="F:/CF_2016/cfusion/wwwroot" WorkDir="F:/CF_2016/cfusion/runtime/conf/Catalina/localhost/tmp">

  <Resources>

    <PreResources base="F:/CF_2016/cfusion/wwwroot/cf_scripts/test_scripts" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/cf_scripts/scripts"/>

  </Resources>

</Context>

 

It seems to work.  Is this correct? Should it be aliased as /scripts or /cfscripts instead of /cf_scripts/scripts ?

 

Why exactly do I need to alias this for the administrator?

 

Thanks

Change to javacast or json in CF2016?

$
0
0

We were running CF8 and the following code worked.

 

<cfset attributes.email = "manual2016@2016.com">
<cfset attributes.bday = "05-04">
<cfset attributes.name = "test">
<!--- <cfparam name="attributes.email" default="#form.email#">
<cfparam name="attributes.bday" default="#form.month#-#form.year#-1900">
<cfparam name="attributes.name" default="#form.name#"> --->

 

 

<cfset attributes.sdk.addContactStruct = structNew()/>
<cfset attributes.sdk.addContactStruct["Email"] = JavaCast("string", "#attributes.email#") />
<cfset attributes.sdk.addContactStruct["Birthday"] = JavaCast("string", "#attributes.bday#") />
<cfset attributes.sdk.addContactStruct["FirstName"] = JavaCast("string", "#attributes.name#") />
<cfset variables.optinreason = JavaCast("string", "Store newsletter form") />

 

 

<cfset contactId = application.sdk.addWithDupCheck(attributes.sdk.addContactStruct, "Email", variables.optinreason) />

 

 

<cfset TagcontactId = application.sdk.addToGroup(contactId, 178)/>

 

 

We did an upgrade to CF2016 and part of this code no longer works. Specifically:

 

<cfset TagcontactId = application.sdk.addToGroup(contactId, 178)/>

 

Did something in the newer versions of CF change how we need to cast variables like this when they are being past to Java?

 

I've tried to get error messages with CFTRY back but only get

Diagnostics: null null
The error occurred on line -1.

Coldfusion errors with undefined element, dump during error processing shows element defined

$
0
0

Ok, so I've got a strange problem that I've been beating my head against for over a week now.  I'm holding out a little hope that maybe someone here has seen something like this and has a solution or at least can point me in a direction to make some sense of it.


We are running an enterprise application on CF9 currently.  Recently we made a large update with some advancements and in part of the advancements I'm using some request scoped variables.  Now I don't need to hear about how this breaks encapsulation and yada, yada.  There is good reason for doing it the way we have, I can't go into complete details due to company policy but suffice it to say it's necessary.

 

Said request variable is a structure that is set in Application.cfc OnRequestStart.  Randomly since the changes have been put on our production servers we get an error email (we have an error handler defined to capture and email errors when they occur), stating that key.subkey is undefined in request scoped variable.  What makes this so bizarre is in the email from the error handler (that is processed in the same request) shows the key.subkey existing in the request scoped variable in a <cfdump var="#request#"> in the email.  How could it possibly be erroring on a part of the page that runs after OnRequestStart, but before OnError, saying that this structure element doesn't exist yet it does exist during the error handler caused by it.  The request scoped variable btw is not defined or set anywhere else outside of the Application.cfc.

 

I should also mention that other keys in the structure are referenced in the request prior to the point of failure without erroring, some in the same function as the point of error even.  It's almost as if the structure is not fully defined yet while it's processing the page request, but it is fully defined by the time it dumps it in the error email....

 

This problem is really baffling me, and it makes it worse that I can't find any way to reproduce it on our testing servers.

ColdFusion 11 Throws Error Session Variable Undefined, When in fact it is Defined as shown by CFDump.

$
0
0

I've been having a particularly annoying error with ColdFusion 11, and unable to track down the source of this problem.

Basically There are a few variables defined in the session scope we check with isdefined a few lines above to make sure they are defined. Subsequent lines may or may not throw a #variablename# is undefined on random lines.

What can I do to fix this issue? Is this a known bug?

Coldfusion 2016

$
0
0

I am running a Coldfusion application for over 10 years and just upgraded to coldfusion 2016.  Now I am getting strange results.  I have a query that uses values from another query and it says the first query is not defined.  I can get it to work sometimes if I do a cfoutput first but not always.  Also, if I print a value from the first query multilple times, the first time in may be blank and the second time it returns the value.  If I do it 4 times, every other output is correct.  This only starting happening with the latest release.

Viewing all 5979 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>