Bug #2332
closedPATH variable in environment emptied when running a perl script via mod_cgi
Description
On Windows XP, i run this version of Lighty: http://files.wlmp-project.net/pub/WLMP-Project/LightTPD-Win32/LightTPD-1.4.28-1-Win32-SSL.zip
I am using mod_cgi to run the attached perl script via through ActivePerl. The path in the output ends up like this:
'PATH' => 'Ÿ$Ÿ$',
This is problematic because there does not seem to be a way to copy the system path into my script's environment via lighttpd.
Please either ensure this is copied, or provide a way to do so via the config.
Files
Updated by Mithaldu over 13 years ago
The same thing happens when the script is run on a Debian box: http://cat.eatsmou.se/path_test.cgi
Path isn't even weird there, it's flat out missing.
Updated by Mithaldu over 13 years ago
As suggested by icy on IRC, a workaround is:
server.modules = ( "mod_setenv" )
setenv.add-environment = ( "PATH" => env.PATH )
Updated by gstrauss almost 9 years ago
I believe it is intentional that mod_cgi constructs a CGI environment without any implicit inheritance from the lighttpd server environ.
Yes, anything additional that you would like to set in the CGI environment, such as explicit PATH, can be set with mod_setenv.
Updated by stbuehler almost 9 years ago
- Status changed from New to Invalid
Mithaldu wrote:
... or provide a way to do so via the config.
You did so yourself in the meantime.
Also available in: Atom