From fbd5d77ce80167245bfbbe21326920d994a2f9c7 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Fri, 7 Feb 2014 20:23:37 +0000 Subject: [PATCH] Added note about CGI env vars --- docs/Options.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/Options.md b/docs/Options.md index 97e6812a..55dacd0b 100644 --- a/docs/Options.md +++ b/docs/Options.md @@ -43,8 +43,14 @@ Note that PHP scripts must use `php-cgi.exe` executable, not `php.exe`. All files that match `cgi_pattern` are treated as CGI files. Default pattern allows CGI files be anywhere. To restrict CGIs to a certain directory, use `/path/to/cgi-bin/**.cgi` as pattern. Note that full file path is -matched against the pattern, not the URI. Note: if `MONGOOSE_CGI` environment -variable is set, then Mongoose passes it to the CGI script. +matched against the pattern, not the URI. + +When Mongoose starts CGI program, it creates new environment for it (in +contrast, usually child program inherits the environment from parent). Several +environment variables however are inherited from Mongoose's environment, +they are: `PATH`, `TMP`, `TEMP`, `TMPDIR`, `PERLLIB`, `MONGOOSE_CGI`. On UNIX +it is also `LD_LIBRARY_PATH`. On Windows it is also `COMSPEC`, `SYSTEMROOT`, +`SystemDrive`, `ProgramFiles`, `ProgramFiles(x86)`, `CommonProgramFiles(x86)`. Default: `**.cgi$|**.pl$|**.php$`