Re: Setting Server Variables
On Friday 26 Jun 2009, Paul Alkema wrote: > I would just set your variables in the application variables scope instead > of the server variable scope. Or you could set a request variable on the > application.cfm page and just call that every time you need it. Or store the common settings in a single file, and call a CFC from each application's onApplicationStart() that sets the server variables up from the file if they're not present. -- Helping to evangelistically morph viral turn-key bleeding-edge enterprise e-business as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word “partner” to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.co ~| 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:324077 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Setting Server Variables
I would just set your variables in the application variables scope instead of the server variable scope. Or you could set a request variable on the application.cfm page and just call that every time you need it. -Original Message- From: Donnie Carvajal [mailto:donnie.carva...@transformyx.com] Sent: Friday, June 26, 2009 4:03 PM To: cf-talk Subject: Setting Server Variables Almost all of my applications are running on multiple machines and i would like to use server variables to save things like IP addresses and server names that can be used for CFHTTP requests or error reporting. These variables would basically be static and would almost always have the same value for that particular server. For example, WebServer1 will most likely always be named WebServer1, so Server.serverName will never change values on WebServer1. I would like to avoid adding code to every app that always checks to see if the server variables are set. I would prefer to set the server variables after ColdFusion restarts. Any ideas? ~| 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:324008 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Setting Server Variables
Donnie Carvajal wrote: > Any ideas? Look forward to upgrading to ColdFusion 9 in the next year that will (if it does not go away) a Server.cfc file with an OnServerStart() method for just such a purpose. Until, then you have to do something a bit more hokey with your OnApplciaitonStart() method or something with other mechanisms available on your server or something manual. ~| 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:324007 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Setting Server Variables
Almost all of my applications are running on multiple machines and i would like to use server variables to save things like IP addresses and server names that can be used for CFHTTP requests or error reporting. These variables would basically be static and would almost always have the same value for that particular server. For example, WebServer1 will most likely always be named WebServer1, so Server.serverName will never change values on WebServer1. I would like to avoid adding code to every app that always checks to see if the server variables are set. I would prefer to set the server variables after ColdFusion restarts. Any ideas? ~| 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:324006 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Loosing session when setting server variables
Hi, I have an application which sets some server variables, enclosed in a lock on server scope: Since I added this code, apparently, many times, sessions variables are lost in any application and admin users have to relogin. What I am missing? I get this both under CF 5 and CF 7. Should I also lock when I just read the variables ? -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293250 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Setting Server Variables
I don't think this is privided by CF. But what you could do is add the server var declarations to a master Application.cfc and have all the other Apps extend this one. Just a thought. Adrian -Original Message- From: Alex DeMarco Sent: 02 November 2007 19:30 To: CF-Talk Subject: Setting Server Variables Is there a way to set Server variables that get initialized on startup? If so, how? Any pointers would be appreciated. thanks! - Alex ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292612 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Setting Server Variables
Is there a way to set Server variables that get initialized on startup? If so, how? Any pointers would be appreciated. thanks! - Alex ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292565 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Setting Server Variables
You can't. The only thing close to being able to do that would be ensuring that ALL code on your box loads a file (via Application.cfm for example) and then doing, The ability to run code on server start (as well as application, session, client) is a MUCH requested featured. Maybe CFMX200X will have it. :) [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Setting Server Variables
How do I set server variables in CFMX 6.1? I want them to load everytime the instance starts.. - Alex [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]