RE: [PHP] NULL Apache environment variables
| From: | Narvaez, Teresa | Date: | Mon, 18 Feb 2002 23:11:32 +0000 |
| Subject: | RE: [PHP] NULL Apache environment variables | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-85304@lists.php.net to get a copy of this message | ||
The function call phpinfo() shows register_globals=off for master and local
value on my system. I installed PHP and did not change anything because I
do not know enough to make changes so I believe off is the default value.
Thanks,
-Teresa
-----Original Message-----
From: Erik Price [mailto:pricee@hhbrown.com]
Sent: Monday, February 18, 2002 5:58 PM
To: Lars Torben Wilson
Cc: Narvaez, Teresa; php-general@lists.php.net
Subject: Re: [PHP] NULL Apache environment variables
On Monday, February 18, 2002, at 05:44 PM, Lars Torben Wilson wrote:
> On Mon, 2002-02-18 at 08:56, Narvaez, Teresa wrote:
>> Hello,
>> I'm running PHP version 4.1.1. When I invoke this function, <?php
>> phpinfo()?>, all variables are set. However, when I try to retrieve a
>> value
>> of a certain variable like this:
>>
>> <?php echo $HTTP_USER_AGENT; ?>
>>
>> It returns NULL. Is there a missing configuration on apache or php?
>
> As of PHP 4.1.0, register_globals is off by default since globals are so
> icky. Try $_SERVER['HTTP_USER_AGENT'].
>
> This should probably be made more obvious in the docs.
Hm? I didn't think that this was the case -- I thought that although
there is a long-term move to making 'register_globals = off' default,
register_globals is still default to be 'on'. I think that this is
described in the 4.1.0 release announcement.
http://www.php.net/release_4_1_0.php
In the 4.1.1 release announcement, it doesn't say that anything about
this has changed. I'm not trying to contradict you Torben, but if this
is true then it is not documented in the "news" at the web site.
Please correct me.
- Erik
----
Erik Price
Web Developer Temp
Media Lab, H.H. Brown
pricee@hhbrown.com