Skip to main content
Known Participant
January 15, 2013
Answered

Client variables stored in registry getting errors

  • January 15, 2013
  • 1 reply
  • 2688 views

I'm moving from CF9 to CF10.  On the new server I've moved things over, and run the suggested lock-down proceedures.  On the CF9 box, I'm using the registry to store client variables.

On the new server I've set it up to use the registry to store client variables.  In the coldfusion-out file, I'm getting errors like:

Jan 15, 2013 15:39:03 PM Information [ajp-bio-8012-exec-4] - Unable to set value HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\ColdFusion\CurrentVersion\Clients\4210-c8158ffa1993bc18-7CF31106-90B1-1C19-1B0C24F3BDD33D8C\hitcount: Windows error number 0 occurred.The handle is invalid. 

Jan 15, 2013 15:39:03 PM Information [ajp-bio-8012-exec-4] - Unable to set value HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\ColdFusion\CurrentVersion\Clients\4210-c8158ffa1993bc18-7CF31106-90B1-1C19-1B0C24F3BDD33D8C\cftoken: Windows error number 0 occurred.The handle is invalid. 

Jan 15, 2013 15:39:03 PM Information [ajp-bio-8012-exec-4] - Unable to set value HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\ColdFusion\CurrentVersion\Clients\4210-c8158ffa1993bc18-7CF31106-90B1-1C19-1B0C24F3BDD33D8C\cfid: Windows error number 0 occurred.The handle is invalid.

On the new server, CF logs in with its own user whereas on the old system, CF logged in as admin.  I'm guessing this might be the issue. 

Anyone having similar issues or can suggest a solution?  I did a search but most people were either turing off client variables or the answer was from 2006. 

Thanks.

This topic has been closed for replies.
Correct answer Charlie Arehart

All that said (and I do agree with Adam and Carl that you should eschew the registry for client vars), the answer to your question is that yes, it had to do with your having changed the user that the CF service runs as. You need to grant permissions on that path in the registry (HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\ColdFusion\CurrentVersion\Clients\) for that user. Find it using regedit, and right-click on that path, and choose “permissions”.

Hopefully that’s enough to get you going. But again, do give serious thought to switching to cookie or a datasource to hold them.

(Sadly, while many people will tell you to do that, they don’t give any guidance on how to get any and all legit client var data out of the registry and into a new storage mechanism. That’s because it’s not easy, and it’s way too big to discuss here in this forum post.)

/charlie

1 reply

Inspiring
January 15, 2013

This isn't so helpful, but you just shouldn't use the registry for client vars. The registry is not a database, it's a config... er... [thing].

It was stupid of Macromedia (Allaire?) to ever offer it as an option.

You can screw your entire server if things go slightly wrong with it.

Recommend moving 'em to a DB and be done with it (even a wee Derby DB should be fine... better than the registry, anyhow).

Then your problem will just go away anyhow.

--

Adam

Carl Von Stetten
Legend
January 15, 2013

+1 billion to not using the registry!

If you store a few very small pieces of data in client variables, you could use cookies.  Otherwise, use a database as Adam suggests.

-Carl V.

Charlie Arehart
Community Expert
Charlie ArehartCommunity ExpertCorrect answer
Community Expert
January 16, 2013

All that said (and I do agree with Adam and Carl that you should eschew the registry for client vars), the answer to your question is that yes, it had to do with your having changed the user that the CF service runs as. You need to grant permissions on that path in the registry (HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\ColdFusion\CurrentVersion\Clients\) for that user. Find it using regedit, and right-click on that path, and choose “permissions”.

Hopefully that’s enough to get you going. But again, do give serious thought to switching to cookie or a datasource to hold them.

(Sadly, while many people will tell you to do that, they don’t give any guidance on how to get any and all legit client var data out of the registry and into a new storage mechanism. That’s because it’s not easy, and it’s way too big to discuss here in this forum post.)

/charlie

/Charlie (troubleshooter, carehart. org)