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

Problems when CGI environment variables exceed 4KB in size #128

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

Comments

@GoogleCodeExporter
Copy link

If for example PATH environment variable is about 4KB, then Mongoose web server 
will skip adding any further env variables to CGI environment. This includes 
HTTP_ env variables (build from http headers) and phpdesktop env variables 
(temp dir, phpdesktop version etc). The solution is to increase the 
CGI_ENVIRONMENT_SIZE constant in Mongoose web server.

Issue reported on Forum:
https://groups.google.com/d/topic/phpdesktop/HaP5Igv4ebU/discussion

Original issue reported on code.google.com by [email protected] on 8 Oct 2014 at 9:26

@GoogleCodeExporter
Copy link
Author

Error messages in debug.log file look like this:

    - 09:31:35.797 WARNING: vsnprintf error
    - 09:31:35.797 WARNING: addenv: CGI env buffer truncated for [HTTP_%s=%s]
    - 09:31:35.797 WARNING: vsnprintf error
    - 09:31:35.797 WARNING: addenv: CGI env buffer truncated for [HTTP_%s=%s]
    - 09:31:35.813 WARNING: vsnprintf error
    - 09:31:35.813 WARNING: addenv: CGI env buffer truncated for [%.*s]
    - 09:31:35.813 WARNING: vsnprintf error
    - 09:31:35.813 WARNING: addenv: CGI env buffer truncated for [%.*s]
    - 09:31:35.813 WARNING: vsnprintf error
    - 09:31:35.813 WARNING: addenv: CGI env buffer truncated for [%.*s]
    - 09:31:35.813 WARNING: vsnprintf error
    - 09:31:35.813 WARNING: addenv: CGI env buffer truncated for [%.*s]
    - 09:31:35.813 WARNING: vsnprintf error
    - 09:31:35.813 WARNING: addenv: CGI env buffer truncated for [%.*s]

Original comment by [email protected] on 8 Oct 2014 at 9:34

@GoogleCodeExporter
Copy link
Author

Fixed in revision 615b7caecf84. Limit is now set to 64KB. Also exceeded number 
of env variables to 512.

Original comment by [email protected] on 8 Oct 2014 at 9:38

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

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

Original comment by [email protected] 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
None yet
Projects
None yet
Development

No branches or pull requests

1 participant