Re: getting $_ENV variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



   I guess I really didn't understand that myself before either.  So
Richard, even though it's disabling data output, it still exists as an
array?

   Well, damn.... you really DO learn something new every day.


On 5/10/07, Richard Davey <rich@xxxxxxxxxxxxx> wrote:

Daniel Brown wrote:

>    If it's suggesting that it's an array, that's a little baffling,
because
> that means there are multiple entries (at least two), but they appear to
> either be null or otherwise unable to display.

The $_ENV superb-global contains an array of environment settings, so
it's not totally baffling that print_r() on it should return an array.

The reason it is empty is because the variables_order setting in the
php.ini has had it disabled.

The default is:

variables_order = "EGPCS"

But it must have been changed to:

variables_order = "GPCS"

Dropping the E (Environment variables) will cause a print_r($_ENV) to be
totally empty. Some hosts do this in order to hide the environment
settings because they can contain sensitive information such as the CPU
identifiers, etc. I've seen the 'cheaper' hosts (especially those
hosting on Windows and/or Virtual Servers) disable this so you can't
tell what kind of CPU they're using, or where their system drive is.

Cheers,

Rich
--
Zend Certified Engineer
http://www.corephp.co.uk

"Never trust a computer you can't throw out of a window"

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux