Article ID: 123673, created on Feb 4, 2015, last review on Feb 4, 2015

  • Applies to:
  • APS


El script de verificación o configuración que utiliza la variable de entorno $_ENV de PHP no funciona correctamente.


Las variables $_ENV se importan desde el entorno bajo el que se ejecuta PHP, también teniendo en cuenta su configuración. La variable $_ENV está vacía. El array no se llenó debido a una opción en php.ini:

; This directive determines which super global arrays are registered when PHP
; starts up. If the register_globals directive is enabled, it also determines
; what order variables are populated into the global space. 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
; is not recommended on productions servers. You can still get access to
; the environment variables through getenv() should you need to.
; Default Value: "EGPCS"
; Development Value: "GPCS"
; Production Value: "GPCS";
variables_order = "GPCS"


En php.ini, establezca la opción variables_order a "EGPCS".


Email subscription for changes to this article
Save as PDF