Quantcast
Channel: Adobe Community : Popular Discussions - ColdFusion
Viewing all 14291 articles
Browse latest View live

Encrypt data in a created Excel file

$
0
0

Hi,

 

Is there away in Cold Fusion2016 to encrypt the contents of a create Excel file, either completely or by cell?

 

Then allow the user to de-encrypt the Excel file after it has been created?

 

Using the following to create an excel file.

 

<cfset TabChar = Chr(9)>
<cfset NewLine = Chr(13) & Chr(10)>
<cfheader name="Content-Disposition" value="attachment; filename=reports.xls">
<CFCONTENT TYPE="application/vnd.ms-excel" RESET="Yes">

 

 

Thanks in advance,

 

 

Mike

 


Preventing error logging to exception.log

$
0
0

Is there a way to prevent errors from logging to the exception.log file?

 

I have a piece of LDAP code that has an authentication related error (by design). The code is wrapped in a cftry statement and has a catch to handle the error appropriately for the user. However, it also logs a massive block of error output to the exception.log file which is completely unnecessary and makes it more difficult to monitor for legitimate errors there.

 

I don't recall this LDAP authentication error showing up in the exception log until more recently (maybe around CF2016 update 8+ time?) but it has been consistent since then and persists on CF2018.

 

Specific error is ""Error","ajp-nio-8018-exec-3","08/29/19","20:42:43",""," LDAP: error code 49 - 80090308: LdapErr: DSID-0C09042A, comment: AcceptSecurityContext error, data 52e, v3839".  I know what it is, I know why it happens, I just don't want it in the exception.log file

 

Thanks!

How to reset the password of cold fusion administrator

Run/Start .Exe file in ColdFusion

$
0
0

Hi guys,

 

am trying to open up a .exe file like notepad or whatever windows program with using <cfexecute> but seems it doesn't work at all. I'm able to write the command in cmd and run the exe file but when i put the command in cfexecute so i get nothing.

 

 

here is the command i would like to run:

 

"C:\Program Files (x86)\Vc\vc.exe" -e "\Crystal\BF_Faktura_D.rpt"

 

altso, run/start a simple .exe windows program. I think there is something about security access from CF server or something like that.

 

ANY HELP?

How to change temporary unable to service request page in CF 11

$
0
0

Hi

 

 

im currently tinkering around with Coldfusion 11, and ive noticed that if we turn the service off, any request to a .cfm page is greeted with an a tom cat error screen, I imagine that in production there will have cases of where the CF Service would need to be restarted, and Im wondering how I would change this to be a specific HTML page within the site.

 

The service is unavailable.

Service Temporarily Unavailable!

 

 

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

 

  Tomcat/ISAPI/isapi_redirector/1.2.41

 

 

Ive seen on some other sources that people have indicated that it should be altered via the wsconfig.properties file.

However I cant seem to decipher how I would set this within the following.

 

 

    #ColdFusion Web Server Configuration File

    #Wed Dec 23 15:15:08 EST 2015

    1=IIS,0,true,"",bitness64

    1.srv=localhost,cfusion

    2=IIS,0,true,"",bitness64

    2.srv=localhost,cfusion

 

 

I assume this cant be done via the application.cfc because the file isnt able to be run, and also cant be  done within IIS as its clearly displaying a totally different page.

 

Ideally I would like to display a static HTML file indicating the site will be back shortly with the files located in the website root but cant seem to figure out how to do it?

 

thanks in advance

Oracle LISTAGG causing query to run S L O W

$
0
0

Hello, all,

 

I've got a query that is giving me fits.

 

I'm trying to bring some code that my boss recently wrote into the 21st century.  One section that he wrote, he is using three queries to get base information, looping through one of the queries and running a query within that loop.  I hate this.  Every time I see code that runs a query within a loop, it makes my teeth itch.  So, I'm trying to run a single query using LEFT OUTER JOIN.

 

I've got it working, but for one thing.  I am trying to get our Oracle db to aggregate some data into a string using LISTAGG(), and that is causing this query to take 14 seconds to get the data (the way my boss wrote the code, it's almost instant.)  Of the two tables involved, one has ~2000 records, the other ~4000, and the query is retrieving 23.  If I take out the LISTAGG() portion, the query is almost instant.

 

I was hoping to get the db to do more of the heavy lifting.  Is there anything faster than LISTAGG() for aggregating data into a string in Oracle 12c?

 

SELECT m1.uuid, m1.title, m1.description,      (SELECT listagg(title,', ') within group (order by null) csv       FROM main       WHERE uuid in (SELECT role_uuid FROM assoc WHERE task_uuid = m1.uuid)) related_titles

FROM main m1

WHERE m1.uuid in (SELECT a1.task_uuid FROM assoc a1 WHERE a1.role_uuid = '{uuid}' AND task_uuid is not null)

ORDER BY m1.title

 

V/r,

 

^ _ ^

Coldfusion 11 update 14 breaks Shibboleth

$
0
0

I am running the Shibboleth login service on my ColdFusion 11 server.  After I installed update 14 my Shibboleth login stopped working.  All I get now is a "Bad Request" error following Shibboleth authentication. I uninstalled the update which got Shibboleth working again, but now I am looking for possible solutions to this problem before reapplying the update.  I think it may have to do with the Tomcat update to 7.0.85.  Does anyone have any thoughts on this?

cfexchangecalendar changing timezone on recurring events

$
0
0

Hello,

 

I am not sure if this is a bug or if I am not using the tag correctly. The following occurs in ColdFusion 2018 release.

 

If I setup a new event with cfexchangecalendar, using the following event parameters, the timezone changes to (UTC+00:00) Monrovia, Reykjavik (and the event time is therefore incorrect):

 

<cfset local.event.Message = "Event Message">

<cfset local.event.Subject = "Event Subject">

<cfset local.event.AllDayEvent = "no">

<cfset local.event.StartTime = createDateTime(2019, 7, 26, 0, 0, 0)>

<cfset local.event.EndTime = createDateTime(2019, 7, 27, 0, 0, 0)>

<cfset local.event.IsRecurring = "yes">

<cfset local.event.RecurrenceType = "WEEKLY">

<cfset local.event.RecurrenceEndDate = createDateTime(2019, 12, 31, 0, 0, 0)>

<cfset local.event.RecurrenceDays = "MON">

 

Any assistance would be appreciated.

 

Thank you,

 

Robert


cfmail (mail.jar) not logging all errors

$
0
0

We've had this issue for a while apparently (now running v11u18) where emails won't get sent but they are also not always logged by CF. We have been using Java 1.8.0_144 since it came out and use a third-party SMTP server (our domain host). Pretty much all errors that do get logged simply say this in the log:

"Error","scheduler-2","04/09/19","14:08:40",,"com.sun.mail.smtp.SMTPSendFailedException: 250 Requested mail action okay, completed: id=0MFJUg-1h8QzQ2Nj2-00ERMH ;   nested exception is: com.sun.mail.smtp.SMTPAddressFailedException: 550-Requested action not taken: mailbox unavailable 550 invalid DNS MX or A/AAAA resource record "

 

Even though the actual error for that message according to what is returned via Outlook is:

503 Bad sequence of commands

 

One of our client's is BCC'd on every email from their site, but they are not getting messages sent to one of their customer's that does have an invalid email. However, there has been no indication of an issue in CF, but Outlook indeed returns:

Remote Server returned '550 5.1.10 RESOLVER.ADR.RecipientNotFound; Recipient not found by SMTP address lookup'

 

On CFAdmin under Mail Logging Settings,

execute js function on clicking tab?

$
0
0

i have a js function that works fine when attached to the onClick event of a button, but i want it to execute when user clicks the tab

 

is there a way to do that?

 

function clearURL() {

var testURL = document.URL;

var urlQry = testURL.split("?")[1];

if (urlQry != "")

    {

    var activeTab = ColdFusion.Layout.getTabLayout('myLayout').getActiveTab().title;

    if (activeTab == 'myTabTitle')

        {

        var newURL = testURL.split("?")[0];

        window.location = newURL;

        }

    }

}

 

thanks

ColdFusion CFHTTPPARAM Content-Type?

$
0
0

I am attempting to upload a file using the Dropbox API.  Dropbox requires Contact-Type = "application/octet-stream", which I am tried to set in the cfhttpparam type = "header".  However when I post the data to the API.  I get an error stating: Bad HTTP "Content-Type" header: "application/octet-stream,multipart/form-data; boundary=-----------------------------7d0d117230764".  I am guessing that when a cfhttpparam type = "file" is included, the content-type is modified to also include multipart/form-data.  The api will not accept this content-type.  Is there a way to avoid this behavior?  This is the code I am using to attempt the upload.  Thank you.

 

<cfhttp method="post" url="https://content.dropboxapi.com/2/files/upload" result="uploadFile">

  <cfhttpparam type="header" name="Authorization" value="Bearer #DropboxAccessToken#">

  <cfhttpparam type="header" name="Dropbox-API-Arg" value="#serializeJSON(stFields)#">

  <cfhttpparam type="header" name="Dropbox-API-Select-User" value="#DropboxMemberID#">

  <cfhttpparam type="header" name="Content-Type" value="application/octet-stream">

  <cfhttpparam type="file" name="1_1036.gif" file="C:\1_1036.gif">

</cfhttp>

Send data with JSON

$
0
0

I am trying to learn how to post data to an external site using JSON. The example the vendor gave me looks like this:

curl -XPOST --data '{"audioLevel": 50, "url": "http://some-stream.de/"}'

http://TheirURL.com:7000/device/00:08:e1:06:c5:39/send

 

From doing some research I think I need to make an array, the SerializeJSON the array then use CFHTTP to send it. I can't find anything that explains the curl -XPOST --data

I am struggling to try to wrap my head around this. Would appreciate any pointers.

 

Thanks,

Gary

CF10: Apache returns 404 when ;jsessionid is appended

$
0
0

Hi all,

 

we are currently upgrading a SLES 11 Server to CF10 64bit.

Last week we spend 2 days to eliminate a problem with the connector.

Apache refused to deliver CF-Pages. The log file said that mod_jk could not connect to the cfusion instance - Error 503...

 

We finally fixed this by copying a mod_jk binary from a working CF10 Server to this one.

Now Apache (2.2.23) serves all CF pages flawlessly.

 

What I just discovered was a problem, when a client doesn't accept cookies and J2EE-Sessions are turned on.

A URL with the sessionid appended (as for example cflocation creates it) results in a 404 error:

http://xxxxx.xxxxxx.com/login.cfm;jsessionid=xyxxyxyxyxyxyxy

 

I remember such a problem from a CF6/7 install, but that was IIS on Windows.

 

I'm just stuck with this one.

Can somebody please help?

 

Regards

Joerg

Dynamically Populating CFSelect Dropdowns

$
0
0

I have a page with 3 dropdown fields. The 2nd dropdown uses the selection from the first to create the options list and the 3rd dropdown uses the selection in the 2nd to create that list. I'm using CFSelect with the bind option and a function in a CFC file. The page loads fine, I select the item out of the first dropdown and the 2nd dropdown is correctly bound to the data returned. But, I get a browser error that tells me that there was an error executing a database query and that I need to add cfdebug to my url. This isn't an error that halts execution, it's just a little modal where I can click on "Ok" to get rid of it and then when I select an item in the 2nd dropdown, the 3rd dropdown is correctly loaded. The code from both the CFM and CFC files is below.

 

Is the page trying to bind the 3rd dropdown at the same time as the 2nd? How can I keep from getting that error?

 

Thanks

 

DW

 

Code from CFM file:

<table>

<tr>

<td>Category 1:<br />

            <cfselect name="proceduretype1"

               query = "Gettoplevel"

               display ="proceduretypename"

               value ="proceduretypeid"

               multiple="no"

               size="6" /></td>

<td> </td>

<td>Category 2:<br />

            <cfselect name="proceduretype2"

               bind="cfc:dynamicdropdown.getnextlevel({proceduretype1})"

               bindonload="false"

               type="link"

               display="proceduretypename"

               value="proceduretypeid"

               multiple="no"

               size="6"/></td>

<td> </td>

<td>Category 3:<br />

            <cfselect name="procduretype3"

               bind="cfc:dynamicdropdown.getnextlevel({proceduretype2})"

               bindonload="false"

               type="link"

               display="proceduretypename"

               value="proceduretypeid"

               multiple="no"

               size="6"/></td>

 

Code from CFC file:

<cfcomponent name="dynamicdropdown">

 

<cffunction name="getnextlevel" access="remote" returntype="query">

      <cfargument name="parentid" type="any" required="no">

      <!---Define variables--->

      <cfset var data="proceduretype">

      <!---Run query to get Date Data--->

      <cfquery name="data" datasource="cusp_dev">

         SELECT *

         FROM tblproceduretype

         WHERE proceduretypeparent=#ARGUMENTS.parentid#

         ORDER BY proceduretypename

      </cfquery>

      <!---And return it--->

      <cfreturn data>

</cffunction>

 

</cfcomponent>

Unable to update the NT registry. Variable DRIVERPATH is undefined.

$
0
0

Hi All,

 

Got a bit of a problem. When i try to add a microsoft access database to the datasources in the coldfusion administrator i get the following error message:

 

Unable to update the NT registry.
Variable DRIVERPATH is undefined.

I read the following post (http://forums.adobe.com/thread/142416) which had a possible solution for this problem,

 

---------------------------------------

I had same problem with x64 vista found answer

 

Open C:\Windows\SysWOW64\odbcad32.exe and create a System DSN using the Microsoft Access Driver (*.mdb).

Then open the ColdFusion Admin and create a datasource using the ODBC Socket driver.

Check the Trusted connection checkbox and it should work.

----------------------------------------

 

Unfortunately i cannot select the dsn datasource in the coldfusion administrator although i did add it to C:\Windows\SysWOW64\odbcad32.exe

Any help would be greatly appriciated.

 

Well the following article did work http://forums.adobe.com/message/1971734 so this topic can be closed.

 

My system specs are:

Windows 7 enterprise (64 bit)

Coldfusion 9 (64 bit)

 

Kind regards,

Nebu

.


After upgrade to CF9, CFIMAGE "Unable to create temporary file" error

$
0
0

We recently upgraded from CF8 to CF9 Enterprise.  I'm getting an "Unable to create temporary file" error on

my CFIMAGE resize calls.  We use sandbox security.  I assume I need to grant write access to whatever folder CF uses for temp files, but which folder is it?   The same code (and sandbox settings) ran fine in CF8....

 

Note, if I attempt to add C:\JRun4\servers\cfusion\SERVER-INF\temp to the sandbox for this particular app, CF crashes on all requests across all apps on the server with a:

 

Security: The requested template has been denied access to C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfclasses\cfapp2ecfc1510154633.c lass.
The following is the internal exception message: access denied (java.io.FilePermission C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfclasses\cfapp2ecfc1510154633.c lass read)

ColdFusion cannot determine the line of the template that caused this error. This is often caused by an error in the exception handling subsystem.

 

 

I need to restart CF to get everything working again.

Creating a multiple choice questions in PDF

$
0
0

I am creating a PDF document with set of questions answerable by multiple choice.

 

Example:

 

For which of the following disciplines is Nobel Prize awarded?

 

A. Physics and Chemistry

B. Physiology or Medicine

C. Literature, Peace and Economics

D. All of the above

 

In this example, the correct answer is "D - All of the above”

 

Here is what I would like to happen:

  1. How can I check if the answer selected is correct?
  2. I also plan to include a "Next" control button that when click, it goes to the next question and cannot go back to the previous question to change their answer.
  3. I want the result (Correct or Wrong) of each question to be display only after the last question has been answer.

        Example:

        Question 1 - Correct

        Question 2 - Correct

        Question 3 - Wrong

        Question 4 - Correct ...

   d.  I also want to display the total score at the end and a note if they passed or failed the test.

 

Thank you in advance.

 

Henry

Where can I Download Cold Fusion Builder 3

$
0
0

I can see my license key in my account but i cant find anywhere i can download old products i have purchased?

CSV import data into SQL

$
0
0

Could anybody tell me if there are any built in functions within CF2016 that would assist in importing a CSV file into SQL?

 

At the moment I'm downloading a ZIP file from a data provider, taking the CSV out of it, putting it into Access, importing the Access into SQL, what a pain! It's time to automate it all!

Flash-based Multi-image upload tool

$
0
0

Recently I learned that the major browsers will stop supporting Flash-driven apps.  So I need an alternative to the existing CF flash-based multi-image upload tool.

 

Not looking to hard code.  Hopefully, there is a similar app to use.

 

<cffileupload

    name = "uploadDemo"

    url="uploadfiles10.cfm?folderid=#getfolder.folderid#"

    progressbar="true"

    addButtonLabel = "Select File(s)"

    clearButtonLabel = "Clear"

    width="500"

    height="400"

    title="Multiple Image Upload Tool"

    maxUploadSize="100"

    maxFileSelect="25"

    extensionfilter="*.jpg"

    uploadButtonLabel="Upload"

    >

Viewing all 14291 articles
Browse latest View live


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