> Hey guys.  I work for a company that does a lot of Asp.net work but for some 
> reason we maintain this ColdFusion / MySql site for
> a business.  Well the current hosting service that the guy uses is no longer 
> going to support ColdFusion so I was charged with the
> task of moving the website over to GoDaddy.

Before you go any farther, there's been a lot of negative comments on
this list about GoDaddy as a CF host, so you might want to take that
into consideration.

> I am by no means a ColdFusion person so I am really out of my element here.  
> For the most part the transfer went smooth.  I
> downloaded all the files from the current spot where the site is hosted and 
> uploaded them to the new location.   I then exported
> the MySql database to .sql using the phpAdmin tool.  Then I created a MySql 
> database on GoDaddy and imported the sql file.
> Everything seems to have gone smoothly up to this point.  I fixed some 
>relatively minor errors that were resulting.  But then when I
> went to add a product to the shopping cart I would get the "variable CFID is 
> undefined" message.  Here is the temporary Domain
> that GoDaddy sets aside: http://emmrod.com.previewdns.com/.  When you click 
> on a product and try to add it to shopping cart
> you will get that message.
>
> I am confused as to why after moving from one hosting service to another I 
> would start to get that error.  Is it because a different
> version of ColdFusion might be running the code now?  Like I said I am a 
> ColdFusion newbie so everything I know is from what I
> managed to research about this on Friday.  CFID and CFToken are basically 
> cookies that ColdFusion automatically declares and
> sets when you initiate a new session.  But why aren't they now being set?
>
> Here is some of the code from showcart.cfm and application.cfm if that helps. 
>  Any help at all with this would be much
> appreciated.  Thank you!
>
> Application.cfm:
>
> <cfsetting showdebugoutput="yes">
> <cfapplication name="emmrod" sessionmanagement="Yes" 
> sessiontimeout="#createtimespan(0,2,0,0)#">

According to this, your application should be setting cookies for
session management. CF has two different mechanisms for doing this.
You might either use "old-fashioned" CF sessions, which rely on two
tokens for session management, CFID and CFTOKEN. Or, if you're using
CF 6+, you could use "J2EE" sessions, which rely on a single token for
session management, JSESSIONID.

It appears neither of these are being set. Sessions can be disabled on
the server in the CF Administrator, but I would think that if this
were done your Application.cfm should generate a different error.

You could try explicitly setting cookies, although this shouldn't be necessary:
<cfapplication ... setclientcookies="yes">

Also, while we're looking at the CFAPPLICATION tag, you don't want
sessions to last for two hours, which is what you have with your
SESSIONTIMEOUT attribute. I suspect that's being overridden by the
default setting in CF Application anyway, which is 20 minutes.

>                <cfquery datasource="mysqlcf_emmrod" name="getcolors">SELECT 
> products_colors FROM products WHERE products_id = #form.products_id#</cfquery>

You really, REALLY, need to use CFQUERYPARAM anywhere you use values
from the browser in SQL statements. This is critically important to
preventing SQL injection attacks. I strongly suggest you fix this
before going live.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training ce

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332833
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to