| # Environment variables
The Uniform Server controller automatically detects Zero XV modules loaded and sets environment paths and variables as appropriate. Adding additional environment paths and variables for third party modules (programs) in Uniform Server is provided through two configuration sections in configuration file C:\UniServerZ\home\us_config\us_config.ini. This page covers these sections in details. ## Environment %PATH% [ENV_PATHS] PATH specifies the location where the operating system looks when running a command. The path environment variable %PATH% consists of absolute paths for each folder, separated by a semicolon. The Uniform Server controller builds a new environment path as follows: The paths specified in configuration file are expanded (if required) and concatenated with a semicolon separator. The controller detects installed modules and concatenates paths as required to the above path, again separated by a semicolon. The environment variable %PATH% passed to the controller is concatenated with the above path. Finally, the environment variable %PATH% is updated with the new path.
Path example: For example, suppose we want to add the following two paths: C:\UniServerZ\docs and C:\UniServerZ\docs\manual Edit configuration file C:\UniServerZ\home\us_config\us_config.ini and either edit or create a new section [ENV_PATHS] as shown on the right. |  |
    [ENV_PATHS]
    path=C:\UniServerZ\docs
    path=C:\UniServerZ\docs\manual
View environment path: Start UniController, click Server Console button, type in PATH and press enter. Result is shown on the right. Note: first two lines after PATH= are the paths set in the configuration file. |  |
    C:\UniServerZ>PATH
    PATH=C:\UniServerZ\docs;
    C:\UniServerZ\docs\manual;
    C:\UniServerZ\core\apache2\bin;...
Portable path example: Absolute paths were used in the above example, which is fine for a fixed installation or required if paths are outside The Uniform Server folder UniServerZ. For paths below UniServerZ, use the predefined variable %UniConPath% to create a relative path which is portable. Above example using relative paths is shown on the right. |  |
    [ENV_PATHS]
    path=%UniConPath%\docs
    path=%UniConPath%\docs\manual
## Environment variables [ENV_VARS] The [ENV_VARS] section allows you to define new environment variables or modify existing variable values. The format is variable_name=variable_value.
Variable example: For example, suppose we want to add the following two variables: PHP_INI_SCAN_DIR=%UniConPath%\user_php_inis and fred1=22 Edit configuration file C:\UniServerZ\home\us_config\us_config.ini and either edit or create a new section [ENV_VARS] as shown on the right. |  |
    [ENV_VARS]
    PHP_INI_SCAN_DIR=%UniConPath%\user_php_inis
    fred1=22
View all environment variables: Start UniController, click Server Console button, type in SET and press Enter. Result is shown on the right. Note: for clarity, the output was edited to show only the two variables. |  |
    C:\UniServerZ>set
    fred1=22
    PHP_INI_SCAN_DIR=C:\UniServerZ\user_php_inis
Note: %UniConPath% expanded to C:\UniServerZ
Portable path: A relative path was specified for the variable PHP_INI_SCAN_DIR value. The predefined variable %UniConPath% is expanded to a full path. Advantage of using relative paths is portablity. |
--oOo--