Re: getting $_ENV variables

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

 



Yes, my PHPinfo shows under configuration: variables_order = GPCS
I will test EGPCS setting in php.ini
But that also means that code using $_ENV cannot be run with hosts hiding the environment settings ?!
And I assume that EGPCS will also affect: <?php print_r($_FILES); ?>
Now with GPCS this script shows also only: Array ( )
So also potential problems with $_FILES with hosts hiding the environment settings ?!

Regards, Cor

----- Original Message ----- From: "Richard Davey" <rich@xxxxxxxxxxxxx>
To: "php-general@xxxxxxxxxxx" <php-general@xxxxxxxxxxxxx>
Sent: Thursday, May 10, 2007 2:44 PM
Subject: Re:  getting $_ENV variables


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



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


[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