http://coldfusion.com logo
Join Slack
Powered by
# cfml-general
  • m

    mk

    09/06/2022, 4:24 PM
    is there a way instead of cftry catch, if authentication failed for cflap, i can show in an alert or not
    g
    r
    • 3
    • 2
  • j

    Jeff Stevens

    09/06/2022, 6:26 PM
    Hello! Today I have a question about serving files with ColdFusion. I need to load images from a secured network drive into an HTML document on my Coldfusion server. I understand that because the network drive is not part of the webroot, this is not an option and is considered a security feature to protect the files that live on the network drive and server. I have done some research and found these solutions: https://stackoverflow.com/a/46003218/16511184 https://www.tek-tips.com/viewthread.cfm?qid=935379 These solutions both mention the use of server-side code to access images, as the server should have permission to access files on the network drive. My question is, how do I deliver the images to the HTML document, and in ColdFusion? My naiive guess was to just grab the image name from a query made on the server, but just slotting the name into the img tag's src attribute creates the original issue of client trying to access an image on the network drive they don't have permission to view.
    s
    t
    +2
    • 5
    • 4
  • j

    Jason Ryan

    09/06/2022, 9:32 PM
    Starting with a
    Lucee-light
    Docker image and attempting to add the necessary extensions one at a time. As an example,
    form.extension
    . I've tried adding the
    f_orm.extension-1.0.0.10.jar_
    to
    /opt/lucee/server/lucee-server/bundles/
    as well as
    /opt/lucee/server/lucee-server/context/extensions/available
    (per Lucee docs) and both yield a "not loaded" status for
    form.extension
    when checking in Lucee admin. These happen at container build time so obviously restarting it isn't required. Any idea where I need to put these darn
    .jar
    files to get an "active" status on them?
    c
    s
    • 3
    • 4
  • g

    Graham

    09/07/2022, 8:25 AM
    I have a Coldfusion 2021 install question. If I install Standard edition on a Windows server with 4 Virtual CPUs does it only use 2 CPUs (as per the licensing conditions) or does it use all 4? If it uses only 2 then if we buy a second Standard license can we use all 4 CPUs?
    e
    • 2
    • 1
  • g

    Graham

    09/07/2022, 8:25 AM
    Thanks
  • z

    zackster

    09/07/2022, 2:36 PM
    https://twitter.com/zackster/status/1567522042064273413
  • j

    Jeanine Blount

    09/07/2022, 6:49 PM
    I'm having an issue with a CF app that is occasionally throwing 403 errors. User clears cache, reloads, and the site pulls up. So something in the cookies is causing the error. Any thoughts on where to start looking?
    s
    • 2
    • 3
  • v

    Victor B Vieira

    09/08/2022, 12:45 AM
    Good night people, Here in Brazil, we have little CFML material and it is getting more and more difficult to find CF professionals and even to convert programmers from another language we don't have updated and quality material, thinking about that the company where I work is looking for a profession that can develop a self-instructional course along the lines of coursera and undemy covering the following topics: Commandbox, intro Basic development in ColdFusion Advanced development in ColdFusion Database integration, by datasource Database integration, by ORM SOAP Web Services Development REST / REST Full API development Development of PDF documents with ColdFusion CommandBox, setup, modules and settings ColdBox, creating an application from scratch and integration with database and API`s ContentBox, creating an application from scratch and integration with database and API`s LogBox, framework introduction ColdBox RELAX, RestFull API OrtusPDF, Development of PDF documents If anyone is interested, please let me know, I'll make the bridge with the company. The material can be produced in English and the company will be responsible for the translation.
    b
    • 2
    • 1
  • b

    bdw429s

    09/08/2022, 2:54 PM
    I think it's an alias for cfsqltype.
    g
    • 2
    • 1
  • a

    Adam Cameron

    09/08/2022, 7:49 PM
    Some CFML randomness for you: https://blog.adamcameron.me/2022/09/cfml-speaking-of-application-scope.html
    g
    • 2
    • 1
  • a

    Adam Cameron

    09/09/2022, 10:32 AM
    @foundeo do you wanna know about tag stuff that cfscript.me can't convert? I looked for a github repo where I could raise an issue etc, but didn't find one.
    d
    b
    • 3
    • 4
  • d

    Daniel Mejia

    09/09/2022, 4:46 PM
    Has cftransaction ever gotten in the way of your code? Code will be explained in thread...
    Copy code
    <cftransaction action="begin">
    	<cfloop query="getEmployees">
            <cfset employee.jobInfo = ultipro.GetJobByEmployeeIdentifier(getEmployees.cb_emp_n)> <!--- cfhttp() + xmlparse() --->
            <cfquery name="qry" datasource="mainds">
                insert into ....
            </cfquery>
        </cfloop>
        
        <cftransaction action="commit">
    </cftransaction>
    d
    s
    +2
    • 5
    • 29
  • g

    gsr

    09/12/2022, 12:13 PM
    i am trying to use bcp to backup the tables data but the cfexecute is not writing anything in the files and not the output
    Copy code
    <cfsavecontent variable="_bcp">
    		-- Run this command to the database you wish to export
    		DECLARE @Commands TABLE(CommandText NVARCHAR(4000));
    		DECLARE @SQL NVARCHAR(4000);
    
    		INSERT INTO @Commands
    		SELECT 'bcp '           --bcp
    		+  QUOTENAME(DB_NAME())+ '.'               --database name
    		+  QUOTENAME(SCHEMA_NAME(SCHEMA_ID))+ '.'  -- schema
    		+  QUOTENAME(name)                         -- table
    		+ ' out c:\temp\csvdump\'                  -- output directory
    		+  REPLACE(SCHEMA_NAME(schema_id),' ','') + '_'
    		+  REPLACE(name,' ','')                    -- file name
    		+ '.xls -Usa -Pqwerty -C 65001 -t "|" -k -c -S localhost'   -- extension, security
    		FROM sys.tables
    
    		-- Copy-paste results to DOS or Powershell prompt or create a BAT file from these.
    		SELECT 'mkdir #application.args.bcpbackupsFolder#\#dateFormat(now(),'MMDDYYYY')#
    		UNION ALL
    		SELECT * FROM @Commands
    	</cfsavecontent>	
    	<cffile action="write" file="#application.temp#/bcp.bat" output="#_bcp#">
    	<cfexecute name="C:\Windows\System32\cmd.exe" arguments="#application.temp#/bcp.bat" timeout="60" outputfile="#application.logs#/log_output_bcp.txt"/>
    i also tried changing the arguments value to put in name but same issue
    m
    g
    • 3
    • 6
  • f

    Formiko

    09/12/2022, 5:09 PM
    Can somebody help me <cfset request.hash_salt = "elec%2018"> is in Application.cfm and I'm not sure what it does
    b
    a
    • 3
    • 15
  • h

    hpeter16

    09/12/2022, 5:23 PM
    Anyone has done ColdFusion SAML configuration with ADFS? I have a few questions regarding the CF and ADFS setup. I have new CF2021 and ADFS both inside hyper-v...The ADFS server DNS is https://myadfs.com, The CF site is https://mycfapplication.com. I have successfully created ADFS and linked it to AD. The question is should I be able to call the https://myadfs.com/adfs/ls/idpinitiatedsignon.aspx page from the CF server? or it is only accessible on the ADFS server? Also, do we need open any port so both servers can communicate? Any help will be appreciated
    e
    • 2
    • 5
  • w

    websolete

    09/12/2022, 7:41 PM
    does/has anyone used a json deserializer other than the BIF? i'm tired of cf turning boolean values into YES / NO
    b
    m
    f
    • 4
    • 41
  • g

    gsr

    09/13/2022, 12:52 PM
    did anyone tried making a cf connection programmatically using code using Widows Authentication i have seen tutorials on the sql connection but not with windows
  • g

    gsr

    09/13/2022, 1:10 PM
    ignore the above, i got connected
    a
    • 2
    • 2
  • o

    Ookma-Kyi

    09/13/2022, 7:28 PM
    I have a question about Booleans. I am trying to insert a Boolean value into my MySQL database and am getting the error
    Incorrect integer value: 'true' for column 'notifications' at row 1
    . Inspecting my database it shows my column is a tinyint. Doing some research MySQL does not have support for true Booleans, however it does support
    true, false, True, False, TRUE, FALSE
    values which is what I am doing. Is there something going on behind the scenes? Source: https://www.mysqltutorial.org/mysql-boolean/
    e
    s
    a
    • 4
    • 16
  • t

    TEMann

    09/13/2022, 7:46 PM
    How does one go about getting the install bin for CF 2018 linux when coming from comand line only RHEL?
    m
    a
    +5
    • 8
    • 12
  • s

    Slackbot

    09/14/2022, 11:45 AM
    This message was deleted.
    a
    • 2
    • 1
  • f

    Formiko

    09/14/2022, 4:46 PM
    I need some hep with spaghetti code and request scope. I have an app that needs to search courses in the current semester. Sounds easy enough, but this is just the heginning of the page: <!---<cfsilent> ---> <cfset request.usewaitlist=1> <cfset request.valid_prog = false> <cfset request.showdates = 0> <cfif NOT (IsDefined("url.time") AND REFind("^(fall|spring|summer)\_\d\d\d\d$",url.time))> <cflocation url = "index.cfm" addtoken="no"> </cfif> <cfparam name="url.first_year" default="0"> <cfif IsDefined("url.skill")> <cfset where_text = " AND ((other LIKE 'SKL%') OR (other LIKE '%,SKL%')) "> <cfelseif url.first_year EQ 1> <cfset where_text = " AND ((other LIKE 'FY%') OR (other LIKE '%,FY%')) "> <cfelse> <cfset where_text = " AND ((other IS NULL) OR ((other NOT LIKE 'FY%') AND (other NOT LIKE '%,FY%'))) "> </cfif>
    m
    • 2
    • 2
  • f

    Formiko

    09/14/2022, 4:47 PM
    I think it's in the set request scope, but maybe not.
  • f

    Formiko

    09/14/2022, 4:49 PM
    I have to switch summer to Fall
  • f

    Formiko

    09/14/2022, 4:51 PM
    800 lines of that
  • f

    Formiko

    09/14/2022, 5:44 PM
    How do I add this to the url by default ?time=fall_2022
    b
    • 2
    • 2
  • j

    jumpmaster

    09/14/2022, 7:04 PM
    If I have an old CF11 app using a big application.cfm file, can I still do something like onRequestStart?
    d
    m
    +2
    • 5
    • 16
  • s

    Scott Steinbeck

    09/14/2022, 10:01 PM
    does anyone know how to get a site hosted on hostek (shared hosting) to recognize updated jars set in the application.cfc?
    m
    g
    • 3
    • 5
  • r

    Ryan Albrecht

    09/14/2022, 11:39 PM
    Who is going to cfsummit?
    d
    g
    +4
    • 7
    • 17
  • d

    davla

    09/15/2022, 1:21 PM
    Would appreciate some architectural advice on some changes I want to make to an existing API (Taffy). I currently have an endpoint ‘/news/publish/[newsid]’. The resource cfc that processes this endpoint carries out various functions related to the newsid being posted, mainly to create a published version of the news record in the database. In the current version of the cfc it also sends an email to a system editor (distinct from the person publishing the news record). I would like to abstract the section of code that sends the system editor email so that I can handle different requirements for different “partners”. Currently the system editor is one such “partner”. I was hoping to create a cfc with a standard set of public methods for each “partner”. Internally this could then handle their different requirements. For one partner it could send an email for another it could post to an external api etc. Would these “partner” cfcs be beans or factory or something else?
    z
    w
    e
    • 4
    • 31
1...171819...38Latest