Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFCOOKIE

Status
Not open for further replies.

mikeadmin

MIS
Oct 22, 2001
38
0
0
US
I currently have a CF site and looking to run it on another server for testing purposes. I copied all the pages and database to a different server. However, when I log in, the test server does not load the second page after the login.
I get the following error:
Error Diagnostic Information
An error has occurred while processing the expression:

#Person.AccountID#

The error occurred on (or near) line 38 of the template file C:\PDC\tabs.cfm.


32: <CFABORT>
33: </CFIF>
34:
35:
36:
37: <!--- set the cookies --->
38: <CFCOOKIE NAME=&quot;CurrentColor&quot; VALUE=&quot;#HomeColor#&quot; PATH=&quot;/PDC&quot; DOMAIN=&quot;.state.ct.us&quot;>
39: <CFCOOKIE NAME=&quot;CurrentAccountID&quot; VALUE=&quot;#Person.AccountID#&quot; PATH=&quot;/PDC&quot; DOMAIN=&quot;.state.ct.us&quot;>
40: <CFCOOKIE NAME=&quot;CurrentAccountTypeID&quot; VALUE=&quot;#Person.AccountTypeID#&quot; PATH=&quot;/PDC&quot; DOMAIN=&quot;.state.ct.us&quot;>



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

Error resolving parameter PERSON.ACCOUNTID


Cold Fusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either:

You have misspelled the parameter name, or
You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE tag.


Can anyone offer any assistance. This code runs fine on the current server.
Thanks
Mike
 
Is there a query named &quot;Person&quot; at all? If there is, I would put these lines right after the </cfquery tag>:
Code:
<cfoutput>#Person.AccountID#</cfoutput>
<cfabort>
Then try running your app again and see if you can get that ID number. If you still get the error then your query isn't working right. Is the datasource on both machines named the same thing? Try putting a CFTRY/CFCATCH block around it to see if there are errors in the query part:
Code:
<cftry>
<cfquery name=&quot;Person&quot; datasource=&quot;whatever&quot;>
SELECT AccountID FROM mytable
</cfquery><cfcatch type=&quot;database&quot;>
    <cfoutput>cfcatch.message</cfoutput>
    <cfabort>
</cfcatch>
</cftry>
Hope this helps to pin it down!
 
Thanks for the response.
I tried what you said but I still cannot get past the cookies. I think the query isnt running. How do I find out if there is a query named &quot;person&quot;. I have to feel there is because this site is currently up and running on a differenst server and I didnt change any files. The only thing different is that drive location is &quot;F&quot; on one server and &quot;C&quot; on test server where I am having problems.
Domain name is different to.
Does this make it any clearer? I hope so. Thanks alot.
Mike
 
Well you should have some <cfquery> tag somewhere above what you posted with
Code:
name=&quot;Person&quot;
as a parameter. If you can't find this then that is exactly what is wrong.

If you're sure that it's working on the other server, then I would look to server settings. Every query has a datasource associated with it. Is the datasource that you used on the old server one with the same name and attributes on the new server? For example, if you have a tag like this on the old server:
Code:
<cfquery name=&quot;Person&quot; datasource=&quot;myDSN&quot;>
then you'll need to set up the datasource called &quot;myDSN&quot; on the new server and point it to the same database or a copy of the old database. It has to mirror it exactly (or at least mirror the tables you're using here).

I think the first step is to find that
Code:
<cfquery>
line and double-check the name and datasource for accuracy on your new server. Let me know!
 
Hi
I found the query called <CFQUERY NAME=&quot;Person&quot; DATASOURCE=&quot;PDC&quot;> and this is the same one on the current server. This may sound silly but what does datasource=&quot;PDC&quot; have to match? I use SQL 7.0. I am assuming somewhere in there so I will go take a look while I wait. Oh btw, I have a data source called PDC in cold fusion admin section. I verified it and it connects fine. It is connected with a SQL driver.
Thanks
 
Yes, the place in the admin section where you can verify PDC -- it should connect to the same db or a copy of that db on both servers. The reason for this is that if you're going to &quot;mytable&quot; in a database on the old server using the PDC datasource you'll also need to be able to access the same or exact copy of &quot;mytable&quot; on the new server. Cool?

Great you found the
Code:
CFQUERY
tag! Okay, now since this app doesn't work anyway put this line right after the
Code:
</CFQUERY>
tag for that Person query:

<cfoutput>AccountID = #Person.AccountID#</cfoutput>
<cfabort>

Run the page and see if you get that to equal something. Does it work, as in return a number or something? Then we have a problem somewhere between the query and that place where you're setting the cookie. Is the query and the cookie stuff in the same file or in a file that includes one or the other or both?

If it returns something then it knows what
Code:
Person.AccountID
is at one point, then suddenly doesn't know anymore. Not possible, so something is going on with the code.

Let me know how the experiment pans out!
 
All Set! I changed the location of server in PDCamdmin page and now it works.
Thank you everyone for your help!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top