Re: NULL Apache environment variables
| From: | Lars Torben Wilson | Date: | Mon, 18 Feb 2002 22:44:54 +0000 |
| Subject: | Re: NULL Apache environment variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-85299@lists.php.net to get a copy of this message | ||
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.
> Thanks,
> -Teresa
Cheers,
Torben
--
Torben Wilson <torben@php.net>
http://www.thebuttlesschaps.com
http://www.hybrid17.com
http://www.inflatableeye.com
+1.604.709.0506