Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing CGI environment variables: WINDIR and others #136

Closed
GoogleCodeExporter opened this issue Aug 28, 2015 · 7 comments
Closed

Missing CGI environment variables: WINDIR and others #136

GoogleCodeExporter opened this issue Aug 28, 2015 · 7 comments
Labels

Comments

@GoogleCodeExporter
Copy link

May the missing WINDIR env variable be the cause of sql server extension 
failing to load sqlserv32.dll during connect? (see error message in Issue 135).

Expose these environment variables:

 _ENV["ALLUSERSPROFILE"] => C:\ProgramData
 _ENV["APPDATA"] => C:\Users\ctomczak\AppData\Roaming
 _ENV["COMPUTERNAME"] => CTOMCZAK-PC
 _ENV["LOCALAPPDATA"] => C:\Users\ctomczak\AppData\Local
 _ENV["OS"] => Windows_NT
 _ENV["PROCESSOR_ARCHITECTURE"] => x86
 _ENV["PROCESSOR_ARCHITEW6432"] => AMD64
 _ENV["PROCESSOR_IDENTIFIER"] => Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
 _ENV["ProgramData"] => C:\ProgramData
 _ENV["ProgramW6432"] => C:\Program Files
 _ENV["PUBLIC"] => C:\Users\Public
 _ENV["USERNAME"] => ctomczak
 _ENV["USERPROFILE"] => C:\Users\ctomczak

 _ENV["windir"] => C:\Windows (php.exe -i shows this env var in lowercase. Why not uppercase WINDIR, does it make difference?)

 _ENV["ComSpec"] => C:\Windows\system32\cmd.exe (note that there is "COMSPEC" exposed by Mongoose but it is uppercase, does it make difference?)

 _ENV["SystemRoot"] => C:\Windows (note that Mongoose exposes "SYSTEMROOT", does uppercase make difference?)

Is there an easy way to obtain all environment variables exposed by OS using 
WINAPI? See `GetEnvironmentStrings` on MSDN: 
http://msdn.microsoft.com/en-us/library/windows/desktop/ms683187(v=vs.85).aspx

Original issue reported on code.google.com by czarek.t...@gmail.com on 21 Oct 2014 at 9:18

@GoogleCodeExporter
Copy link
Author

Regarding problem with loading %windir%/system32/sqlsrv32.dll - this has 
probably nothing to do with %windir% env variable not being exposed. In this 
post Dallin explains he got SQL Server working fine with PHP Desktop after 
downloading a correct version of DLL, see:
https://groups.google.com/d/msg/phpdesktop/GNOcA93gN1k/1y2_WI4iYLQJ

Original comment by czarek.t...@gmail.com on 21 Oct 2014 at 9:30

@GoogleCodeExporter
Copy link
Author

when you place the file under www/%windir%/system32/ the file is found but 
couldnt load because it only laods in C:/windows/system32 folder


Original comment by benschh...@gmail.com on 21 Oct 2014 at 9:38

@GoogleCodeExporter
Copy link
Author

@#2 benschhold: To confirm that the missing WINDIR envrionment variable is 
causing the issue, try setting that env var using command line flag and see if 
that solves the problem. See: 
https://code.google.com/p/phpdesktop/wiki/CGIEnvironmentFromArgs .

Original comment by czarek.t...@gmail.com on 21 Oct 2014 at 9:50

@GoogleCodeExporter
Copy link
Author

i am not shure if i did what you said but i did set verbindung=%windir% and the 
result was:
[VERBINDUNG_] =>  C:\Windows

so windir should be working right?

Original comment by benschh...@gmail.com on 21 Oct 2014 at 10:21

@GoogleCodeExporter
Copy link
Author

Original comment by czarek.t...@gmail.com on 21 Oct 2014 at 10:29

  • Added labels: Restrict-AddIssueComment-Commit

@GoogleCodeExporter
Copy link
Author

%ComSpec% and %SystemRoot% should be in camel case, and %windir% should be in 
lowercase, according to https://en.wikipedia.org/wiki/Environment_variable . 
See also: 
http://msdn.microsoft.com/en-us/library/windows/desktop/dd378457(v=vs.85).aspx .

Fixed in revision d2b1fb29f7da. phpdesktop chrome 31.8 / msie 1.14 executables 
were updated on dropbox. Lots of new environment variables have been exposed:

    [APPDATA] => C:\Users\ctomczak\AppData\Roaming
    [LOCALAPPDATA] => C:\Users\ctomczak\AppData\Local
    [ComSpec] => C:\Windows\system32\cmd.exe
    [OS] => Windows_NT
    [ProgramFiles] => C:\Program Files (x86)
    [ProgramFiles(x86)] => C:\Program Files (x86)
    [ProgramW6432] => C:\Program Files
    [CommonProgramFiles] => C:\Program Files (x86)\Common Files
    [CommonProgramFiles(x86)] => C:\Program Files (x86)\Common Files
    [CommonProgramW6432] => C:\Program Files\Common Files
    [SystemDrive] => C:
    [SystemRoot] => C:\Windows
    [windir] => C:\Windows
    [ALLUSERSPROFILE] => C:\ProgramData
    [ProgramData] => C:\ProgramData
    [PUBLIC] => C:\Users\Public
    [USERDOMAIN] => ctomczak-PC
    [USERPROFILE] => C:\Users\ctomczak
    [HOMEPATH] => \Users\ctomczak
    [HOMEDRIVE] => C:
    [COMPUTERNAME] => CTOMCZAK-PC
    [LOGONSERVER] => \\CTOMCZAK-PC
    [PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    [PSModulePath] => C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
    [USERNAME] => ctomczak

Original comment by czarek.t...@gmail.com on 30 Oct 2014 at 9:47

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Project will move to Github. Find this issue at the new address (soon): 
https://github.com/cztomczak/phpdesktop/issues/136

Original comment by czarek.t...@gmail.com on 24 Aug 2015 at 3:32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant