Server Variables


Server variables are a type of persistent variable. Server variables are specific to the server on which they are created and are stored in that server's random-access memory (RAM) memory.

As with our other variables types that are stored in memory, creating or reading server variables from memory can lead to memory corruption and server instability. To access server variables, you should properly apply a CFLOCK tag around the variable access.

As mentioned, server variables are persistent, but they are also specific to the server on which they are set and exist until the ColdFusion Server is restarted, unless they are specifically deleted from the structure.

To access the server structure, use the CFDUMP tag, as follows:

 <cfdump var="#server#"> 

There are different predefined server variables that refer to the ColdFusion installation on the server and to the server's OS. They are listed in Table 8.2.

Table 8.2. Predefined Server Variables

Variable Name

Description

Server.ColdFusion.Expiration

Empty if ColdFusion is a nonexpiring version. Contains an expiration date/time if it is an expiring license.

Server.ColdFusion.ProductLevel

Description of product license; Enterprise, Professional, or Developer.

Server.ColdFusion.ProductName

Name of ColdFusion product.

Server.ColdFusion.RootDir

Product installation directory.

Server.ColdFusion.SerialNumber

Serial number of the ColdFusion installation.

Server.ColdFusion.SupportedLocales

Comma-delimited list of languages supported by the current ColdFusion installation.

Server.OS.AdditionalInformation

Additional information about the OS installation.

Server.OS.Arch

OS architectural model.

Server.OS.BuildNumber

Build number of the OS installation.

Server.OS.Name

Name of the OS installation.

Server.OS.Version

OS installation version number.



Inside ColdFusion MX
Inside Coldfusion MX
ISBN: 0735713049
EAN: 2147483647
Year: 2005
Pages: 579

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net