Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

$_ENV is not enabled by default, $_SERVER should be used #8

Closed
weierophinney opened this issue Dec 31, 2019 · 1 comment
Closed

$_ENV is not enabled by default, $_SERVER should be used #8

weierophinney opened this issue Dec 31, 2019 · 1 comment

Comments

@weierophinney
Copy link
Member

Ubuntu has a default setting which only stores the environment variables in $_SERVER. The $_ENV is always empty, only when variables_order is changed to EGPCS $_ENV is available.

Quote from the php.ini:

; This directive determines which super global arrays are registered when PHP
; starts up. G,P,C,E & S are abbreviations for the following respective super
; globals: GET, POST, COOKIE, ENV and SERVER. There is a performance penalty
; paid for the registration of these arrays and because ENV is not as commonly
; used as the others, ENV is not recommended on productions servers. You
; can still get access to the environment variables through getenv() should you
; need to.

Therefore I think zend-console should use $_SERVER instead of $_ENV


Originally posted by @jaapio at zendframework/zend-console#18

@weierophinney
Copy link
Member Author

This package is abandoned and will receive no further development!

We recommend using laminas/laminas-cli.

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

No branches or pull requests

1 participant