Server Variables  
 
 

Server variables are available to all users and all applications accessing the current web server, until the ColdFusion server is shut down.

Server variables are useful for storing information that does not change often and can be shared across many users and ColdFusion applications. You might use server variables to store information needed by all applications running at your site -- for example, information about a datasource. Use server variables when it's more efficient to store general information in memory than to run a query with each request.

In addition, the following built-in server variables are available in ColdFusion and provide feedback on your ColdFusion server:

  • Server.ColdFusion.ProductName -- Returns the ColdFusion product name.
  • Server.ColdFusion.ProductVersion -- Returns the ColdFusion product release information.
  • Server.ColdFusion.ProductLevel -- Returns the ColdFusion product level information.
  • Server.ColdFusion.SerialNumber -- Returns the ColdFusion serial number.
  • Server.OS.Name -- Returns the server operating system name.
  • Server.OS.AdditionalInformation -- Returns additional information about the server operating system.
  • Server.OS.Version -- Returns the operating system version of the server.
  • Server.OS.BuildNumber -- Returns the build number of the server operating system.
 
 
  Note  
 

Server variables are read-write; be careful not to overwrite these built-in server variables.

 
 
  Sample server variable output  
 
 

The following table shows sample server variable output for a Windows NT installation:

Server Variable Sample Output
Variable
Sample Output
Server.ColdFusion.ProductName
ColdFusion Engine
Server.ColdFusion.ProductVersion
4, 0, 0, 0
Server.ColdFusion.ProductLevel
Professional
Server.ColdFusion.SerialNumber
varies
Server.OS.Name
NT/Solaris
Server.OS.AdditionalInformation
Service Pack 3
Server.OS.Version
4.0/5.0.3
Server.OS.BuildNumber
1381

For information about the CGI variables that are created by Web servers and browsers, see Using CGI Environment Variables in this chapter.



 
 
BackUp LevelNext
 
 

allaire     AllaireDoc@allaire.com
    Copyright © 1998, Allaire Corporation. All rights reserved.