php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19316 getenv() doesn't work under Apache 2.0.40
Submitted: 2002-09-09 09:17 UTC Modified: 2002-09-09 09:39 UTC
From: the0retic at webscript dot ru Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 4.2.3 OS: Windows XP
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: the0retic at webscript dot ru
New email:
PHP Version: OS:

 

 [2002-09-09 09:17 UTC] the0retic at webscript dot ru
Server configuration:
Apache 2.0.40
PHP 4.2.3 as module

Platform:
Windows XP Professional

getenv("DOCUMENT_ROOT") returns empty string

$HTTP_SERVER_VARS["DOCUMENT_ROOT"] returns correct path

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-09 09:18 UTC] the0retic at webscript dot ru
Server configuration:
Apache 2.0.40
PHP 4.2.3 as module

Platform:
Windows XP Professional

getenv("<env_variable>") returns empty string

$HTTP_SERVER_VARS["<env_variable>"] returns correct path
 [2002-09-09 09:39 UTC] hholzgra@php.net
expected behavior

not every server api passes stuff through environment
variables, that's what $HTTP_SERVER_VARS was created for

just simply don't use getenv() for server variables
but for real environment access only (not likely that
you need this at all on Windows)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 18:01:30 2024 UTC