Changes between Version 1 and Version 2 of EnvironmentVariables


Ignore:
Timestamp:
May 15, 2009, 5:33:15 AM (15 years ago)
Author:
dmorissette
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • EnvironmentVariables

    v1 v2  
    1717== MS_MAP_PATTERN ==
    1818
     19(Added in 5.4.0, [http://mapserver.org/development/rfc/ms-rfc-56.html#ms-map-pattern-environment-variable RFC-56])
     20
     21The optional MS_MAP_PATTERN environment variable can be used to specify a Regular Expression that
     22must be matched by all mapfile paths passed to the mapserv CGI.
     23
     24If MS_MAP_PATTERN is not set then any .map file can be loaded.
     25
     26Example, use Apache's SetEnv directive to restrict mapfiles to
     27the /opt/mapserver/ directory and subdirectories:
     28
     29{{{
     30SetEnv MS_MAP_PATTERN "^/opt/mapserver/"
     31}}}
     32
    1933== MS_MAP_NO_PATH ==
    2034
    21 (Added in 5.4.0)
     35(Added in 5.4.0, [http://mapserver.org/development/rfc/ms-rfc-56.html#ms-map-no-path-environment-variable RFC-56])
     36
     37The optional MS_MAP_NO_PATH environment variable can be set to any value
     38to forbid the use of explicit paths in the map=... URL parameter.
     39Setting MS_MAP_NO_PATH to **any value** forces the use of the
     40map=<env_variable_name> mechanism in mapserv CGI URLs.
     41
     42If this variable is not set then nothing changes and the mapserv CGI still
     43accepts explicit file paths via the map=... URL parameter.
     44
     45Example, set set MS_MAP_NOPATH and some mapfile paths in Apache's httpd.conf:
     46
     47{{{
     48SetEnv MS_MAP_NO_PATH "foo"
     49SetEnv MY_MAPFILE "/opt/mapserver/map1/mymapfile.map"
     50}}}
     51
     52... and then calls the mapserv CGI must use environment variables for the
     53map=... parameter:
     54{{{
     55http://localhost/cgi-bin/mapserv?map=MY_MAPFILE&mode=...
     56}}}
    2257
    2358== MS_MODE ==
     
    2762== MS_ERRORFILE ==
    2863
     64See [http://mapserver.org/development/rfc/ms-rfc-28.html#setting-ms-errorfile RFC-28]
     65
     66The variable MS_ERRORFILE specifies the location of the logging/debug output, with possible values being either a file path on disk, or one of the following special values:
     67
     68    * “stderr” to send output to standard error. Under Apache stderr is the Apache error_log file. Under IIS stderr goes to stdout so its use is discouraged. With IIS it is recommended to direct output to a file on disk instead.
     69    * “stdout” to send output to standard output, combined with the rest of MapServer’s output
     70    * “windowsdebug” to send output to the Windows OutputDebugString API, allowing the use of external programs like SysInternals debugview to display the debug output.
     71
     72It is possible to specify MS_ERRORFILE either as an environment variable or via a CONFIG directive inside a mapfile:
     73
     74{{{
     75CONFIG  "MS_ERRORFILE" "/tmp/mapserver.log"
     76}}}
     77
     78or
     79
     80{{{
     81CONFIG  "MS_ERRORFILE" "stderr"
     82}}}
     83
     84If both the MS_ERRORFILE environment variable is set and a CONFIG MS_ERRORFILE is also set, then the CONFIG directive takes precedence.
     85
     86If MS_ERRORFILE is not set then error/debug logging is disabled. During parsing of a mapfile, error/debug logging may become available only after the MS_ERRORFILE directive has been parsed.
     87
    2988== MS_DEBUGLEVEL ==
    3089
    31 (Added in 5.0.0)
     90(Added in 5.0.0, see [http://mapserver.org/development/rfc/ms-rfc-28.html#debug-levels RFC-28])
     91
     92A default DEBUG level value can be set using the (optional) MS_DEBUGLEVEL environment variable in combination with the MS_ERRORFILE variable.
     93
     94When set, this value is used as the default debug level value for all map and layer objects as they are loaded by the mapfile parser. This option also sets the debug level for any msDebug() call located outside of the context of a map or layer object, for instance for debug statements relating to initialization before a map is loaded. If a DEBUG value is also specified in the mapfile in some map or layer objects then the local value (in the mapfile) takes precedence over the value of the environment variable.
     95
     96This option is mostly useful when tuning applications by enabling timing/debug output before the map is loaded, to capture the full process initialization and map loading time, for instance.
    3297
    3398== MS_ENCRYPTION_KEY ==
     
    37102== PROJ_LIB ==
    38103
     104See [http://mapserver.org/errors.html#setting-the-location-of-the-epsg-file]
     105
     106The PROJ_LIB environment variable or CONFIG directive can be used to specify the directory where the PROJ.4 data files (including the "epsg" file) are located, if they are not in the default directory where PROJ.4 expects them.
     107
    39108== CURL_CA_BUNDLE ==
    40109