https://issues.apache.org/bugzilla/show_bug.cgi?id=46751
Polecat <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] Version|2.5-HEAD |2.2.24 OS|All |Windows 7 --- Comment #3 from Polecat <[email protected]> --- Title: Can't Set or Pass Environment Variables who's names contain special characters '(' or ')'. When I set the parameters in httpd.conf to pass Windows 7 x64 bit environment variables to CGI based applications, then as stated before, if they contain any special characters, then these characters are replaced with underscores "_". This can cause CGI applications which are x32 based running on an x64 based OS to fail, as the underlying components cannot discern the correct x32 path to the necessary libraries. --------------------------------------------------------- Example: httpd.conf file with a virtual host settings to pass env. variables. <VirtualHost myserver.homesite.com:80> PassEnv ProgramFiles PassEnv ProgramFiles(x86) PassEnv CommonProgramFiles(x86) PassEnv CommonProgramFiles PassEnv CommonProgramFilesW6432 </VirtualHost> Debug Output of passed Environment variables to the CGI app: Note the replacement of (x86) with _86_ in the Variable Names. ---------------------- ProgramFiles=C:\Program Files (x86) ProgramFiles_x86_=C:\Program Files (x86) CommonProgramFiles_x86_=C:\Program Files (x86)\Common Files CommonProgramFiles=C:\Program Files (x86)\Common Files --------------------------------------------------------- After having our CGI apps. work flawlessly for years with Windows XP on Apache, the following errors were seen immediately after upgrade to Win 7 x64. The following error was encountered at the point the CGI app. initiated a call for ADO to action (which then called the underlying OS component), which was not found at the location indicated by the incorrect env. variable. Error in the following Subroutine: LogonToDatabase Error Number = -2147024770 Automation error The specified module could not be found. After much research, and code testing, I have confirmed and verified the cause of the problem is Apache's substitution in the Environment Variable names for the (x86) with _x86_ . --------------------------------------------------------- Additional info: For those affected, there is a work around to this problem to apply Env. Variables in the CGI app. when it launches, but it's a kludge. There is a large potential for affected users in the Windows environment, as this affects any legacy VB app that uses ADO (Database) components and possible other COM based features. https://forums.embarcadero.com/thread.jspa?threadID=57551 I hope it's a rather simple fix, as it would be a great benefit to address. Thanks. --------------------------------------------------------------------------- NOTE: SetEnv is also impacted by this bug on Windows x64. 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" Results in CGI Debug app: ProgramFiles=C:\Program Files ProgramFiles_x86_=C:\Program Files (x86) ProgramFilesW6432=C:\Program Files CommonProgramFiles=C:\Program Files\Common Files CommonProgramFiles_x86_=C:\Program Files (x86)\Common Files CommonProgramFilesW6432=C:\Program Files\Common Files Keywords: PassEnv, SetEnv, Environment Variable, Windows 7 x64, CGI application, VB6, ADODB -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
