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

Various attributes are missing from $_SERVER #2560

Open
jameshfisher opened this issue Apr 29, 2014 · 3 comments
Open

Various attributes are missing from $_SERVER #2560

jameshfisher opened this issue Apr 29, 2014 · 3 comments

Comments

@jameshfisher
Copy link

I have created an automated test for this at: https://github.com/jameshfisher/hhvmbug

Install Vagrant and run test.sh.

At the end of this script it runs a diff that shows that HHVM omits the PHP_AUTH_PW and PHP_AUTH_USER keys from the $_SERVER variable when a client uses basic auth. These are the only keys that HHVM omits.

@jameshfisher
Copy link
Author

Having updated this test case to use PHP-FPM, it appears that the omission of PHP_AUTH_PW and PHP_AUTH_USER is actually due to the use of FastCGI, for some reason.

Still, there are differences between the $_SERVER variables. Specifically, HHVM omits all of these:

FCGI_ROLE, HOME, ORIG_SCRIPT_FILENAME, USER

and adds all of these:

HTTPS, REQUEST_START_TIME, SCRIPT_URI, SCRIPT_URL, THREAD_TYPE

I assume the missing variables at least are backwards-incompatible, so I'll leave this issue open. If anyone with better knowledge thinks these differences are deliberate or harmless, then feel free to close it.

@jameshfisher jameshfisher changed the title PHP_AUTH_PW and PHP_AUTH_USER are missing from $_SERVER Various attributes are missing from $_SERVER Apr 30, 2014
@LiraNuna LiraNuna added this to the Lockdown milestone May 12, 2014
@fredemmott
Copy link
Contributor

Not exactly a dupe of #2646, but the fix we've got for that fixes this too.

@fredemmott
Copy link
Contributor

On second thoughts, nope, those magic ones aren't fixed there.

@fredemmott fredemmott reopened this May 14, 2014
@fredemmott fredemmott removed this from the Lockdown milestone Nov 3, 2014
@jameshfisher jameshfisher removed this from the Lockdown milestone Nov 3, 2014
@lexidor lexidor mentioned this issue Sep 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants