Skip to main content
February 20, 2008
Question

what is wrong here?

  • February 20, 2008
  • 7 replies
  • 600 views
<cfapplication name="App Name" clientmanagement="yes" setclientcookies="yes" sessionTimeout="#CreateTimeSpan(0,0,60,0)#">
<cfquery name="user_q" datasource="#dsn#" username="#user#" password="#pass#">
select user_name,user_role
from tbl_user
where user_id = '#form.user_id#'
</cfquery>
<cfset client.user_name="#user_q.user_name#">
<cfset client.user_role="#user_q.user_role#">


1. How to increase timeout for client varibles?.

2. Is it risky to keep client variable storage default (that is in registry)?.

3. is it better to keep application.cfc rather than application.cfm?.

4. what other thing to improve code and performance?.
    This topic has been closed for replies.

    7 replies

    February 20, 2008
    cf is run in cluster...do i need to use sessionManagement = "yes"?.
    worth it?.

    Inspiring
    February 20, 2008
    4. what other thing to improve code and performance?.
    To improve performance and for security reason use cfqueryparam tag around passed form variables, e.a:
    ...
    where user_id = <cfqueryparam cfsqltype="CF_SQL_VARCHAR" maxlength="10" value="#form.user_id#'">
    Inspiring
    February 20, 2008
    quote:

    Originally posted by: Amm85

    3. is it better to keep application.cfc rather than application.cfm?.


    You have more flexibility with application.cfc than you do with application.cfm.
    Inspiring
    February 20, 2008
    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=appFramework_16.html

    Pretty sure that you can't have a space in the name="App Name", should be
    name="AppName" or name="App_Name"

    You also need to enable sessions, sessionManagement = "yes"

    --
    Ken Ford
    Adobe Community Expert - Dreamweaver
    Fordwebs, LLC
    http://www.fordwebs.com


    "Amm85" <webforumsuser@macromedia.com> wrote in message
    news:fphjdo$lk5$1@forums.macromedia.com...
    > <cfapplication name="App Name" clientmanagement="yes"
    > setclientcookies="yes" sessionTimeout="#CreateTimeSpan(0,0,60,0)#">

    Inspiring
    February 20, 2008
    Amm85 wrote:
    > <cfapplication name="App Name" clientmanagement="yes" setclientcookies="yes" sessionTimeout="#CreateTimeSpan(0,0,60,0)#">


    I don't know. What is it doing that you do not want it to do?

    The only odd thing I see is that you have a sessionTimeout, but you do
    not have a sessionManagement="yes".

    February 20, 2008
    thanks Phil..your suggestion is valuable.
    anything else?.
    Participating Frequently
    February 20, 2008
    quote:

    2. Is it risky to keep client variable storage default (that is in registry)?.
    Client Variables

    Caution: Macromedia recommends that you do not store client variables in the registry because it can critically degrade performance of the server. If you do use the registry to store client variables, you must allocate sufficient memory and disk space.

    Phil