>Kristen Winsor wrote: Stephen, Thanks,
Sorry, I have been working on approx 5 hours of sleep each night for the last 
week trying to put into a big project into production so... Am I understanding 
correctly,if I go with "choice 1", change the application name to 
blah cgi.server_name#:#cgi.SERVER_PORT#, I would be okay? That there could 
never be an instance as I named below, where the port number via the URL was 
82(production), however the banner that the user was seeing was the staging 
server(88) and more importantly, there is no way the user could update the 
staging datasource if they were supposed to be updating the production 
datasource.

choice 2. simply, change the Application.dsn to be request.dsn and proceed as 
previsioly detailed. Subsequently, on the 200+ templates all of the queries' 
datasources would have to change from #application.dsn# to the request.dsn  

Thanks again...sorry, for being slow about this, but when I ran my tests just 
going to a testCgiPort.cfm where I just had You are on the XXX server and using 
XXX datasource 100% of the time the results were expected, it was just once I 
put to production the below, the user received that staging banner, it freaked.



Kris


>The problem you have is that your application name, from your 
>cfapplication tag, is the same in all three of the above cases, so you 
>will be overwriting application.dsn. eg.
>
>UserA is working on the dev site, so accesses the application.cfm/cfc 
>and sets application.dsn to be devData.
>UserB is a standard user, they access the site and they set 
>application.dsn to be dataprod. 
>
>Both of these users are effecting changes to the same variable in the 
>same application space - the same will be happening to application.root 
>as well, so if you get two users accessing the dev and production sites 
>at once, there's no telling what application.dsn could be set to.
>
>You have 2 choices. 
>You can either check the port number above the <CFApplication> tag and 
>append something to the application name, say "_dev" for developement, 
>"_stage" for the staged site and "_live" for the production site.  This 
>would ensure that each site would be working in its own application space.
>
>Or you can change application.dsn to be say request.dsn instead.  This 
>way the variable would only be around for one discrete request.  It 
>should be noted that you are currently setting application.dsn on every 
>request and rather than just once when the application starts.
>
>Hope this helps
>
>Stephen

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:15:1602
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to