Re: [PHP] getting $_ENV variables

2007-05-12 Thread tedd
At 11:54 AM +0100 5/10/07, C.R.Vegelin wrote: All I want is to check the $_ENV['OS'] within PHP scripts. If all you want to do is to find out what the user's OS is, try this: $_SERVER('HTTP_USER_AGENT') Do print_r($_SERVER) to see all it contains. Cheers, tedd -- ---

Re: [PHP] getting $_ENV variables

2007-05-12 Thread Richard Davey
tedd wrote: At 11:54 AM +0100 5/10/07, C.R.Vegelin wrote: All I want is to check the $_ENV['OS'] within PHP scripts. If all you want to do is to find out what the user's OS is, try this: $_SERVER('HTTP_USER_AGENT') Do print_r($_SERVER) to see all it contains. He wanted to tell the OS of

Re: [PHP] getting $_ENV variables

2007-05-10 Thread C.R.Vegelin
Brown To: C.R.Vegelin Cc: [EMAIL PROTECTED] Sent: Wednesday, May 09, 2007 5:26 PM Subject: Re: [PHP] getting $_ENV variables 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

Re: [PHP] getting $_ENV variables

2007-05-10 Thread Daniel Brown
- Original Message - *From:* Daniel Brown [EMAIL PROTECTED] *To:* C.R.Vegelin [EMAIL PROTECTED] *Cc:* [EMAIL PROTECTED] *Sent:* Wednesday, May 09, 2007 5:26 PM *Subject:* Re: [PHP] getting $_ENV variables When I print_r($_ENV); from the CLI on 5.0.4 I get a bunch of results, no problem

Re: [PHP] getting $_ENV variables

2007-05-10 Thread C.R.Vegelin
, 2007 2:24 PM Subject: Re: [PHP] getting $_ENV variables Cor, 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. Did you get

Re: [PHP] getting $_ENV variables

2007-05-10 Thread Richard Davey
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

Re: [PHP] getting $_ENV variables

2007-05-10 Thread Daniel Brown
- *From:* Daniel Brown [EMAIL PROTECTED] *To:* C.R.Vegelin [EMAIL PROTECTED] *Cc:* [EMAIL PROTECTED] *Sent:* Thursday, May 10, 2007 2:24 PM *Subject:* Re: [PHP] getting $_ENV variables Cor, If it's suggesting that it's an array, that's a little baffling, because that means

Re: [PHP] getting $_ENV variables

2007-05-10 Thread Daniel Brown
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 [EMAIL PROTECTED] wrote: Daniel Brown wrote: If

Re: [PHP] getting $_ENV variables

2007-05-10 Thread C.R.Vegelin
: [PHP] 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

Re: [PHP] getting $_ENV variables

2007-05-10 Thread Richard Davey
Daniel Brown wrote: 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? The array ($_ENV) exists, it is just the population of it that has been disabled, thus it's empty. Just in the same way that

Re: [PHP] getting $_ENV variables

2007-05-10 Thread Zoltán Németh
, 2007 2:44 PM Subject: Re: [PHP] 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

Re: [PHP] getting $_ENV variables

2007-05-10 Thread Richard Davey
C.R.Vegelin wrote: 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 ?! Correct. Sucks I know, but some hosts just do this. And I assume

Re: [PHP] getting $_ENV variables

2007-05-10 Thread C.R.Vegelin
Okay, I will use getenv() and keep variables_order = GPCS in php.ini Thanks all and with regards, Cor - Original Message - From: Richard Davey [EMAIL PROTECTED] To: [EMAIL PROTECTED] php-general@lists.php.net Sent: Thursday, May 10, 2007 3:34 PM Subject: Re: [PHP] getting $_ENV

Re: [PHP] getting $_ENV variables

2007-05-09 Thread Daniel Brown
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

Re: [PHP] getting $_ENV variables

2007-05-09 Thread Greg Donald
On 5/9/07, C.R.Vegelin [EMAIL PROTECTED] wrote: 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. You can get it other ways: php -r

Re: [PHP] getting $_ENV variables

2007-05-09 Thread Richard Lynch
On Wed, May 9, 2007 11:57 am, C.R.Vegelin wrote: 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. If phpinfo() shows them, then that is what is

Re: [PHP] getting $_ENV variables

2007-05-09 Thread Richard Lynch
On Wed, May 9, 2007 11:26 am, Daniel Brown wrote: 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. CLI and CGI