php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16679 getenv() function may not work properly
Submitted: 2002-04-18 09:52 UTC Modified: 2002-04-18 10:02 UTC
From: royerj at free dot fr Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.2.0 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: royerj at free dot fr
New email:
PHP Version: OS:

 

 [2002-04-18 09:52 UTC] royerj at free dot fr
When i tried to call the getenv("SERVER_ADDR") method, the return is an empty string.
I know that I can use $_SERVER["SERVER_ADDR"] but I must use the getenv() method.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-18 10:00 UTC] royerj at free dot fr
Not a bug...
I've just seen that this method is only available in CGI mode...
Sorry
 [2002-04-18 10:02 UTC] hholzgra@php.net
yes, that's why we have the $_SERVER array,
as an abstraction Layer to Werbser APIs 
variable access methods

CGI has to rely on process environment
variables for parameter passing, but most
server-module APIs have faster methods to
do this and usualy don't bother to set the
environment variables
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 17 20:01:30 2024 UTC