You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2014/05/20 13:43:28 UTC

[Bug 46751] Can passenv variables who's name contain '(' or ')'

https://issues.apache.org/bugzilla/show_bug.cgi?id=46751

John <jo...@leineweb.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #4 from John <jo...@leineweb.de> ---
If you have a combination of windows x64, apache and a win32 cgi (exe) using
ADODB you have the problem that the enviroment variable
CommonProgramFiles(x86)is translated into CommonProgramFiles_x86_

Adodb needs that env-variable to find the software, so it ends there.


The problem lies in util_script.c (2.4.9)

AP_DECLARE(char **) ap_create_environment(apr_pool_t *p, apr_table_t *t)
{
...
        while (*whack != '=') {
            if (!apr_isalnum(*whack)) {
                *whack = '_';
            }
            ++whack;
        }
...
}


I propose a Change into : 

        while (*whack != '=') {
            if (!apr_isalnum(*whack) && *whack != '(' && *whack != ')') {
                *whack = '_';
            }
            ++whack;
        }


You also need the following in Httpd.conf:  

SetEnv ProgramFiles "C:\Program Files"
SetEnv "ProgramFiles(x86)" "C:\Program Files (x86)"
SetEnv ProgramFilesW6432 "C:\Program Files"
SetEnv CommonProgramFiles "C:\Program Files\Common Files"
SetEnv "CommonProgramFiles(x86)" "C:\Program Files (x86)\Common Files"
SetEnv CommonProgramFilesW6432 "C:\Program Files\Common Files"

I tested the proposal with httpd 2.2 and httpd 2.4.9. Works fine.

Send me a message if you need the mod_cgi.so file

cheers

John

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org