Re: getting $_ENV variables

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

 



   When I print_r($_ENV); from the CLI on 5.0.4 I get a bunch of results,
no problem.... but no $_ENV['OS'] variable.  Further, when I check my
phpinfo(); output, there are even fewer $_ENV variables printed than the CLI
offers.

   I'm not certain about this, Cor, but my guess is that PHP 5.x.x may have
altered the default $_ENV output to hide some of this information --- which
is a good thing, in my opinion, because then you won't just have some
run-of-the-mill script kiddie checking out the details of a box for known
security holes.

   Of course, that doesn't necessarily stop <? passthru('uname -a')."\n";
?> or checking the $_SERVER['SERVER_SIGNATURE'] variable for the OS
information.... so perhaps this response is just one of those white-bread
responses.  Something to chew on, but you really don't get anything from it.


On 5/9/07, C.R.Vegelin <cr.vegelin@xxxxxxxxx> wrote:

Hi All,

I get nothing when using: echo $_ENV['OS'];
Also nothing when using: print_r($_ENV);
However, phpinfo(); show a full list of ENV settings.
How to get $_ENV variables ?
I am using PHP version 5.2.0.

TIA, Cor




--
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