Why do I get a "variable CFID is undefined" message following a transfer of a ColdFusion site to a new hosting service?

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.  

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 would be much appreciated.  Thank you!


<cfsetting showdebugoutput="yes">
<cfapplication name="emmrod" sessionmanagement="Yes" sessiontimeout="#createtimespan(0,2,0,0)#">


<cfparam name="url.action" default="">
<cfparam name="url.remove" default="">
<!--- add to cart section ---->
<cfif url.action eq "add">
	<cfparam name="form.products_extrainfo" default="">
	<cfparam name="form.products_extrainfo2" default="">
	<cfparam name="form.products_extrainfo3" default="">
	<cfparam name="form.products_extrainfoname" default="">
	<cfparam name="form.products_extrainfo2name" default="">
	<cfparam name="form.products_extrainfo3name" default="">
	<cfparam name="form.selectchoice" default="">
	<cfif len(form.selectchoice) gt 0>
		<cfquery datasource="mysqlcf_emmrod" name="getcolors">SELECT products_colors FROM products WHERE products_id = #form.products_id#</cfquery>
		<cfset form.selectchoice = listgetat(getcolors.products_colors, evaluate(form.selectchoice + 1))>
	<cfquery datasource="mysqlcf_emmrod">INSERT into orders(orderItemID, orderDateTime, orderCustomer, orderQuantity, orderinfo1, orderinfo2, orderinfo3, orderinfo1name, orderinfo2name, orderinfo3name, selectchoice) 
	VALUES('#form.products_id#', #Now()#, '#cfid##cftoken#', #form.quantity#, '#form.products_extrainfo#', '#form.products_extrainfo2#', '#form.products_extrainfo3#', '#form.products_extrainfoname#', '#form.products_extrainfo2name#', '#form.products_extrainfo3name#', '#form.selectchoice#')

<cfif len(url.remove) gt 0>
	<cfquery datasource="mysqlcf_emmrod">DELETE FROM orders WHERE orderkey = #url.remove#</cfquery>

<!--- display cart --->
<table width="500" border="0" cellspacing="0" cellpadding="0">
	<tr><td align="Center" colspan="5"><h3>Shopping Cart</h3></td></tr>
		<TD align="center" colspan="5">
	<cfquery datasource="mysqlcf_emmrod" name="getOrder">SELECT * FROM orders WHERE orderCustomer= '#cfid##cftoken#' AND orderDateTime > #parsedatetime(dateadd("d", -1, now()))#   </cfquery>

			<form action="index.cfm?page=showcart.cfm&action=update" method="post"> 	
			  	<table width="98%" border="0" align="center" style="background-color : Silver; border : thin solid Gray;">
                    <td width="20%" height="21"><font color="#333333" face="Arial, Helvetica, sans-serif"><strong>Product</strong></font></td>
                    <td width="15%"><font color="#333333" face="Arial, Helvetica, sans-serif"><strong>Quantity</strong></font></td>
					<td width="25%"><font color="#333333" face="Arial, Helvetica, sans-serif"><strong>Info</strong></font></td>
                    <td width="20%"><font color="#333333" face="Arial, Helvetica, sans-serif"><strong>Price</strong></font></td>
                    <td width="20%"><font color="#333333" face="Arial, Helvetica, sans-serif"><strong>Subtotal</strong></font></td>
			<cfparam name="subtotal" default="0">
                  <cfoutput query="getOrder"> 
                    <cfquery name="specificproduct" datasource="mysqlcf_emmrod">
                    SELECT * from products WHERE products_id = #orderItemID# 
                      <td><font color="##333333" face="Arial, Helvetica, sans-serif">#specificproduct.products_model# 
                        </font><br><font size="-2"><a href="index.cfm?page=showcart.cfm&remove=#orderkey#" onClick="return confirm('Are you sure you want to delete this from your cart?');">[remove]</a></font></td>
                      <td> <font color="##333333" face="Arial, Helvetica, sans-serif"> 
						<td><font color="##333333" face="Arial, Helvetica, sans-serif" size="-2"> 
						<cfif len(orderinfo1name) gt 0><strong>#orderinfo1name#:</strong> #orderinfo1#<br></cfif>
						<cfif len(orderinfo2name) gt 0><strong>#orderinfo2name#:</strong> #orderinfo2#<br></cfif>
						<cfif len(orderinfo3name) gt 0><strong>#orderinfo3name#:</strong> #orderinfo3#<br></cfif>
						<cfif len(selectchoice) gt 0><strong>choice:</strong> #selectchoice#<br></cfif>
                      <td> <font color="##333333" face="Arial, Helvetica, sans-serif">#dollarformat(specificproduct.products_price)# 
                      <td><font color="##333333" face="Arial, Helvetica, sans-serif">

					  	#dollarformat(orderQuantity * specificproduct.products_price)#  
                        <cfset subtotal = subtotal + (#orderQuantity# * #specificproduct.products_price#)>
                    <td colspan="4" align="right">
						<font color="#333333" face="Arial, Helvetica, sans-serif"><strong>Subtotal: <cfoutput>#dollarformat(subtotal)#</cfoutput> </strong></font>
				  <TR><TD colspan="4">&nbsp;&nbsp;</TD></TR>
				  <cfif Subtotal EQ 0>
						<td colspan="4" align="right"> 
							<h4><a href="https://www.emmrod.com/index.cfm?page=products.cfm">No Items Ordered.  Return to Products Page.</a></h4>
						<td colspan="4" align="right"> 
							<cfoutput><a href="https://www.emmrod.com/cart/index.cfm?page=orderpage.cfm&order=#cfid##cftoken#"></cfoutput><img src="images/checkout.gif" align="right" border=0 alt="Emmrod Checkout"></a>

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

How are you keeping track of the order ID with session variables?
Try adding this to your <cfapplication> tag:

Also, on your old hosts, what was being used for client variable storage?  Login to the CF Administrator, and on the Client variables page it should have selected one of Database, Registry or Cookie.  
I see you are using these to track you session I see in the insert you have #cfid##cftoken# basically as an order ID.

Try changing application.cfm to an Application.cfc Capitalize the A and use these setting see if that make any difference.

      <cfset This.clientmanagement="True">
      <cfset This.loginstorage="Session">
      <cfset This.sessionmanagement="True">
      <cfset This.sessiontimeout="#createtimespan(0,2,0,0)#">
      <cfset This.applicationtimeout="#createtimespan(5,0,0,0)#">
      <cfset This.setClientCookies="True">


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

ssoutrsAuthor Commented:
Thanks guys I will try out your ideas.  I got selected for Jury Duty so I spent all day today doing that and will have to return for that tomorrow...Will let you know if your ideas worked for me.

Like I said I am a complete ColdFusion newbie.  The only thing we do with the site typically is add content using your typical html equivalent tags.  But we did not make the site so some of the CF infrastructure things such as client and session variable storage I am clueless about.  We have never had the need to delve into anything like that until now.

Thanks again.
ssoutrsAuthor Commented:
Oh, and when you say log into the CF Administrator?  I keep on hearing that quite a bit in what I have read but for the life of me I cannot find where to log into that at.  The account is with GoDaddy and I do not see any CF administrative options..I hope GoDaddy does not require a premium account for that hehe.
ssoutrsAuthor Commented:
Wow, RickEpnet's solution worked for me.  That shocked me.  I have tried so many different solutions that everything I try I automatically assume it is going to fail hehe.  

I like to learn things I am ignorant of however, so do you mind explaining to me why that worked so I can file it away?

Thanks again for the solution and to the rest of you for your input :).

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.