RE: [PHP] NULL Apache environment variables
| From: | Narvaez, Teresa | Date: | Mon, 18 Feb 2002 20:42:20 +0000 |
| Subject: | RE: [PHP] NULL Apache environment variables | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-85277@lists.php.net to get a copy of this message | ||
Thank you ... that worked! I did not know this because I looked at a sample
in www.php.net and the sample fails to call getenv().
Thanks!
-Teresa
-----Original Message-----
From: Neil Freeman [mailto:neil.freeman@asa.co.uk]
Sent: Monday, February 18, 2002 12:54 PM
To: Narvaez, Teresa
Cc: php-general@lists.php.net
Subject: Re: [PHP] NULL Apache environment variables
Have a look at the function getenv()..........
eg:
$ip = getenv ("REMOTE_ADDR"); // get the ip number of the user
HTH
Neil
"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?
>
> Thanks,
> -Teresa
>
> ***************************************************************
> This message was virus checked with: SAVI 3.53 Jan 2002
> last updated 30th January 2002
> ***************************************************************
--
--------------------------------
Email: neil.freeman@asa.co.uk
neil_freeman@yahoo.com
--------------------------------